mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
drivers/rtc/rtc-88pm860x.c: 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 <[email protected]> Acked-by: Jingoo Han <[email protected]> Cc: Haojian Zhuang <[email protected]> Cc: Sachin Kamat <[email protected]> Cc: Alessandro Zummo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
fae67ad431
commit
e66040cbd2
1 changed files with 1 additions and 1 deletions
|
|
@ -293,7 +293,7 @@ static int pm860x_rtc_dt_init(struct platform_device *pdev,
|
|||
int ret;
|
||||
if (!np)
|
||||
return -ENODEV;
|
||||
np = of_find_node_by_name(np, "rtc");
|
||||
np = of_get_child_by_name(np, "rtc");
|
||||
if (!np) {
|
||||
dev_err(&pdev->dev, "failed to find rtc node\n");
|
||||
return -ENODEV;
|
||||
|
|
|
|||
Loading…
Reference in a new issue