From patchwork Thu Sep 20 08:51:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 1483371 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 9599C3FE65 for ; Thu, 20 Sep 2012 08:55:34 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TEcVs-00052A-EV; Thu, 20 Sep 2012 08:53:36 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TEcUo-0004fF-4l for linux-arm-kernel@lists.infradead.org; Thu, 20 Sep 2012 08:52:31 +0000 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MAN00CU64MYFC50@mailout4.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 20 Sep 2012 17:52:29 +0900 (KST) X-AuditID: cbfee61a-b7f726d000000ec7-e7-505ad94c82c3 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id F0.AE.03783.C49DA505; Thu, 20 Sep 2012 17:52:28 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MAN001S64MRTC90@mmp2.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 20 Sep 2012 17:52:28 +0900 (KST) From: Tomasz Figa To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 5/6] pinctrl: exynos: Correct the detection of wakeup-eint node Date: Thu, 20 Sep 2012 10:51:43 +0200 Message-id: <1348131104-24828-6-git-send-email-t.figa@samsung.com> X-Mailer: git-send-email 1.7.10 In-reply-to: <1348131104-24828-1-git-send-email-t.figa@samsung.com> References: <1348131104-24828-1-git-send-email-t.figa@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrEJMWRmVeSWpSXmKPExsVy+t9jQV2fm1EBBtdX2VhsenyN1YHRY/OS +gDGKC6blNSczLLUIn27BK6MravWsRdc4a6Yf38+SwPjDc4uRk4OCQETiZtXD7NB2GISF+6t B7OFBKYzSqw/x9HFyAVkb2aSaOjcwgKSYBNQk/jc8AisSERAQ2JK12N2kCJmgX2MElMv7QYr Ehbwlzj5+TaYzSKgKjH5WCeYzSvgJLH51SkWiG3yEk/v94EN4hRwljj1oJMZYrOTxNzLq9km MPIuYGRYxSiaWpBcUJyUnmuoV5yYW1yal66XnJ+7iRHs82dSOxhXNlgcYhTgYFTi4W1cHhUg xJpYVlyZe4hRgoNZSYR340SgEG9KYmVValF+fFFpTmrxIUZpDhYlcV7hT4EBQgLpiSWp2amp BalFMFkmDk6pBsaF/w7H812ePK2vtHtL797C+q9XQ/WXL3OxaPkv4/Ls3WOBZ28jn1q36Zhs ZZyydedmP5O9Wfvqfgff+r9fo9Pfo7JrejlThHmprqX4JmfX7GLmZ7sezS4Q2H3y56nM1tyU nPU3mOwEuKVX3TRsy99UL3H78oPtQid3Hdh9/PiTV7O9lT8fPb9AiaU4I9FQi7moOBEAyB3h 6vUBAAA= X-Spam-Note: CRM114 invocation failed X-Spam-Score: -7.4 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [203.254.224.34 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: kgene.kim@samsung.com, linus.walleij@linaro.org, kyungmin.park@samsung.com, linux-samsung-soc@vger.kernel.org, thomas.abraham@linaro.org, t.figa@samsung.com, m.szyprowski@samsung.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Current way of finding the wakeup-eint node scans the whole device tree not only children of the pinctrl node, so it might detect a wakeup-eint node of another pinctrl device. This patch limits the scope of looking for nodes only to subnodes of the pinctrl node. Signed-off-by: Tomasz Figa Signed-off-by: Kyungmin Park --- drivers/pinctrl/pinctrl-exynos.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/pinctrl/pinctrl-exynos.c b/drivers/pinctrl/pinctrl-exynos.c index 49ef5a2..0d01d19 100644 --- a/drivers/pinctrl/pinctrl-exynos.c +++ b/drivers/pinctrl/pinctrl-exynos.c @@ -431,15 +431,19 @@ static const struct irq_domain_ops exynos_wkup_irqd_ops = { static int exynos_eint_wkup_init(struct samsung_pinctrl_drv_data *d) { struct device *dev = d->dev; - struct device_node *wkup_np; + struct device_node *wkup_np = NULL; + struct device_node *np; struct exynos_weint_data *weint_data; int idx, irq; - wkup_np = of_find_matching_node(dev->of_node, exynos_wkup_irq_ids); - if (!wkup_np) { - dev_err(dev, "wakeup controller node not found\n"); - return -ENODEV; + for_each_child_of_node(dev->of_node, np) { + if (of_match_node(exynos_wkup_irq_ids, np)) { + wkup_np = np; + break; + } } + if (!wkup_np) + return -ENODEV; d->wkup_irqd = irq_domain_add_linear(wkup_np, d->ctrl->nr_wint, &exynos_wkup_irqd_ops, d);