summaryrefslogtreecommitdiff
path: root/drivers/leds/leds-88pm860x.c
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>2014-04-04 11:51:19 +0400
committerBryan Wu <cooloney@gmail.com>2014-05-08 10:28:08 +0400
commit77dfa771677f0af57b4093c81c5fdbd1946e8bc9 (patch)
treebe889454af571e371613d0ddf6deeec9e4c73092 /drivers/leds/leds-88pm860x.c
parentb0571e7e4ec4d62b27711758417c388042f7bae7 (diff)
downloadlinux-77dfa771677f0af57b4093c81c5fdbd1946e8bc9.tar.xz
leds: 88pm860x: Use of_get_child_by_name
Use of_get_child_by_name to obtain reference to charger node instead of of_find_node_by_name which can walk outside of the parent node. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
Diffstat (limited to 'drivers/leds/leds-88pm860x.c')
-rw-r--r--drivers/leds/leds-88pm860x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/leds/leds-88pm860x.c b/drivers/leds/leds-88pm860x.c
index d1e1bca90d11..c3d58e6478ac 100644
--- a/drivers/leds/leds-88pm860x.c
+++ b/drivers/leds/leds-88pm860x.c
@@ -133,7 +133,7 @@ static int pm860x_led_dt_init(struct platform_device *pdev,
nproot = of_node_get(pdev->dev.parent->of_node);
if (!nproot)
return -ENODEV;
- nproot = of_find_node_by_name(nproot, "leds");
+ nproot = of_get_child_by_name(nproot, "leds");
if (!nproot) {
dev_err(&pdev->dev, "failed to find leds node\n");
return -ENODEV;