From patchwork Thu Aug 9 15:53:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 10647 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id AAA8723E40 for ; Thu, 9 Aug 2012 15:54:13 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id 7A4F1A189A8 for ; Thu, 9 Aug 2012 15:54:13 +0000 (UTC) Received: by mail-gg0-f180.google.com with SMTP id f1so593022ggn.11 for ; Thu, 09 Aug 2012 08:54:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=G+XKjrslzSxyjuRSC2CXfCbFs8GOZ3JTf4jiq/BA1sY=; b=AVbZZvD6h7S+xIDKPXY1wzX9Ls1oWaK7k8W8EWSDUZDglMaeVMOIjr3kjUO96Mth1r wnCMXtMnHQfXazRZViwY8hGrxqY8B5gA6xale0k+jBHYgLD8fN3BcwH0BfZHQ2lbLCPu Eor/++eKwRytD4Ow60Py0sUXMgWjZFz/dtj542NzAu1Xd/grMafJJoHRx26wkD8jEBvo c1r8uLjars4mF3/OjdXstvLHNRsZgTM6mpKXnK2XWPLsQ/vcVJi5V/ht+LegJHSAEGtk 4T1blsfasvVaRdhEDBBXNAwmGTX6OYzaqE2Y0oGQhh7+Fj5wwb/c3iwgOwi8o/ANszUh MmDA== Received: by 10.50.170.3 with SMTP id ai3mr1630948igc.9.1344527652982; Thu, 09 Aug 2012 08:54:12 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.200 with SMTP id ew8csp15573igc; Thu, 9 Aug 2012 08:54:12 -0700 (PDT) Received: by 10.180.84.104 with SMTP id x8mr3930515wiy.20.1344527651700; Thu, 09 Aug 2012 08:54:11 -0700 (PDT) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by mx.google.com with ESMTPS id 35si1982361wet.124.2012.08.09.08.54.11 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 09 Aug 2012 08:54:11 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.172 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=209.85.212.172; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.172 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by mail-wi0-f172.google.com with SMTP id hm11so384436wib.13 for ; Thu, 09 Aug 2012 08:54:11 -0700 (PDT) Received: by 10.180.83.66 with SMTP id o2mr3969169wiy.14.1344527651221; Thu, 09 Aug 2012 08:54:11 -0700 (PDT) Received: from localhost.localdomain (cpc1-aztw13-0-0-cust473.18-1.cable.virginmedia.com. [77.102.241.218]) by mx.google.com with ESMTPS id cl8sm2302659wib.10.2012.08.09.08.54.09 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 09 Aug 2012 08:54:10 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: STEricsson_nomadik_linux@list.st.com, linus.walleij@stericsson.com, arnd@arndb.de, broonie@opensource.wolfsonmicro.com, Lee Jones , Samuel Ortiz Subject: [PATCH 6/8] mfd: Use interrupt-parent as IRQ controller if specified in DT Date: Thu, 9 Aug 2012 16:53:53 +0100 Message-Id: <1344527635-6163-7-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1344527635-6163-1-git-send-email-lee.jones@linaro.org> References: <1344527635-6163-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQmH38cHEMxSGiM8+4y+dCT4bYsw1nd37yNHNqcQlqOgKaXkeuJfj3c/Y2+jbBm9kOhCd8Ic Without this patch the default behaviour is to climb the Device Tree and use the first encountered interrupt controller. This does not take into account if a device node has specified to use a particular IRQ controller using the interrupt-parent property. This patch ensures that property is adhered to. CC: Samuel Ortiz Signed-off-by: Lee Jones --- drivers/mfd/mfd-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c index 0c3a01c..bb5e753 100644 --- a/drivers/mfd/mfd-core.c +++ b/drivers/mfd/mfd-core.c @@ -97,7 +97,7 @@ static int mfd_add_device(struct device *parent, int id, for_each_child_of_node(parent->of_node, np) { if (of_device_is_compatible(np, cell->of_compatible)) { pdev->dev.of_node = np; - domain = irq_find_host(parent->of_node); + domain = irq_find_host(np); break; } }