mfd: rk805: fix submodules node available match error
authorchenjh <chenjh@rock-chips.com>
Fri, 24 Feb 2017 06:35:56 +0000 (14:35 +0800)
committerchenjh <chenjh@rock-chips.com>
Fri, 24 Feb 2017 06:40:40 +0000 (14:40 +0800)
include: rtc, gpio, pwrkey

Change-Id: I3c91e2ade911017125c80008c122f4bf484767f3
Signed-off-by: chenjh <chenjh@rock-chips.com>
drivers/gpio/gpio-rk8xx.c
drivers/input/misc/rk8xx-pwrkey.c
drivers/rtc/rtc-rk808.c

index e7707e2fd5c993431354e4d91cc8fe429160e88a..2d41d2aad463eca4c578c21fb631c159b59b12db 100644 (file)
@@ -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");
index 6901c40e4b2cd45ea2207718f3c851e376f39939..580adc227a1762048db3aadcc94b81ae80287407 100644 (file)
@@ -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");
index 55406c4302323c15d971721b7f49105cf6e31ed9..e6274327b43d6c2fd211b9399233e93c20c1a764 100644 (file)
@@ -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;