From 8f704d158ac32da0fabea8a38acad894719a990e Mon Sep 17 00:00:00 2001 From: chenjh Date: Fri, 24 Feb 2017 14:35:56 +0800 Subject: [PATCH] mfd: rk805: fix submodules node available match error include: rtc, gpio, pwrkey Change-Id: I3c91e2ade911017125c80008c122f4bf484767f3 Signed-off-by: chenjh --- drivers/gpio/gpio-rk8xx.c | 2 +- drivers/input/misc/rk8xx-pwrkey.c | 2 +- drivers/rtc/rtc-rk808.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/gpio-rk8xx.c b/drivers/gpio/gpio-rk8xx.c index e7707e2fd5c9..2d41d2aad463 100644 --- a/drivers/gpio/gpio-rk8xx.c +++ b/drivers/gpio/gpio-rk8xx.c @@ -181,7 +181,7 @@ static int rk8xx_gpio_probe(struct platform_device *pdev) struct device_node *np; int ret; - np = of_find_node_by_name(pdev->dev.parent->of_node, "gpio"); + np = of_get_child_by_name(pdev->dev.parent->of_node, "gpio"); if (np) { if (!of_device_is_available(np)) { dev_info(&pdev->dev, "device is disabled\n"); diff --git a/drivers/input/misc/rk8xx-pwrkey.c b/drivers/input/misc/rk8xx-pwrkey.c index 6901c40e4b2c..580adc227a17 100644 --- a/drivers/input/misc/rk8xx-pwrkey.c +++ b/drivers/input/misc/rk8xx-pwrkey.c @@ -59,7 +59,7 @@ static int rk8xx_pwrkey_probe(struct platform_device *pdev) int fall_irq, rise_irq, err; struct device_node *np; - np = of_find_node_by_name(pdev->dev.parent->of_node, "pwrkey"); + np = of_get_child_by_name(pdev->dev.parent->of_node, "pwrkey"); if (np) { if (!of_device_is_available(np)) { dev_info(&pdev->dev, "device is disabled\n"); diff --git a/drivers/rtc/rtc-rk808.c b/drivers/rtc/rtc-rk808.c index 55406c430232..e6274327b43d 100644 --- a/drivers/rtc/rtc-rk808.c +++ b/drivers/rtc/rtc-rk808.c @@ -381,7 +381,7 @@ static int rk808_rtc_probe(struct platform_device *pdev) switch (rk808->variant) { case RK805_ID: - np = of_find_node_by_name(pdev->dev.parent->of_node, "rtc"); + np = of_get_child_by_name(pdev->dev.parent->of_node, "rtc"); if (np && !of_device_is_available(np)) { dev_info(&pdev->dev, "device is disabled\n"); return -EINVAL; -- 2.34.1