diff options
author | Tomasz Figa <t.figa@samsung.com> | 2012-09-20 18:34:01 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2012-09-20 18:34:01 -0400 |
commit | c3ad056b26fe5d5be71b96371b0b2d00b2276ad3 (patch) | |
tree | 6af9ffbf815600d85807ac98a37a488f47a39e5d /drivers/pinctrl/pinctrl-exynos.c | |
parent | 9759e2ebc4bc78c630ad952a288a53d131f1cb53 (diff) |
pinctrl: exynos: Correct the detection of wakeup-eint node
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 <t.figa@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'drivers/pinctrl/pinctrl-exynos.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-exynos.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/pinctrl/pinctrl-exynos.c b/drivers/pinctrl/pinctrl-exynos.c index 49ef5a2f79ae..0d01d19edc91 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 = { | |||
431 | static int exynos_eint_wkup_init(struct samsung_pinctrl_drv_data *d) | 431 | static int exynos_eint_wkup_init(struct samsung_pinctrl_drv_data *d) |
432 | { | 432 | { |
433 | struct device *dev = d->dev; | 433 | struct device *dev = d->dev; |
434 | struct device_node *wkup_np; | 434 | struct device_node *wkup_np = NULL; |
435 | struct device_node *np; | ||
435 | struct exynos_weint_data *weint_data; | 436 | struct exynos_weint_data *weint_data; |
436 | int idx, irq; | 437 | int idx, irq; |
437 | 438 | ||
438 | wkup_np = of_find_matching_node(dev->of_node, exynos_wkup_irq_ids); | 439 | for_each_child_of_node(dev->of_node, np) { |
439 | if (!wkup_np) { | 440 | if (of_match_node(exynos_wkup_irq_ids, np)) { |
440 | dev_err(dev, "wakeup controller node not found\n"); | 441 | wkup_np = np; |
441 | return -ENODEV; | 442 | break; |
443 | } | ||
442 | } | 444 | } |
445 | if (!wkup_np) | ||
446 | return -ENODEV; | ||
443 | 447 | ||
444 | d->wkup_irqd = irq_domain_add_linear(wkup_np, d->ctrl->nr_wint, | 448 | d->wkup_irqd = irq_domain_add_linear(wkup_np, d->ctrl->nr_wint, |
445 | &exynos_wkup_irqd_ops, d); | 449 | &exynos_wkup_irqd_ops, d); |