diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2015-01-14 05:51:58 -0800 |
---|---|---|
committer | Bryan Wu <cooloney@gmail.com> | 2015-01-14 10:40:20 -0800 |
commit | 452bc149947bb31775f0dc6a637fcf792af88e60 (patch) | |
tree | 96fda4c46928d5403b34cc03b216baeab919cab9 /drivers/leds | |
parent | 137fe48d3956a1acfe1851d07ef1fc30fa405e84 (diff) | |
download | linux-452bc149947bb31775f0dc6a637fcf792af88e60.tar.bz2 |
leds: leds-mc13783: Use of_get_child_by_name() instead of refcount hack
of_find_node_by_name() calls of_node_put() on its "from" parameter.
To counter this, mc13xxx_led_probe_dt() calls of_node_get() first.
Use of_get_child_by_name() instead to get rid of the refcount hack.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: linux-leds@vger.kernel.org
Signed-off-by: Bryan Wu <cooloney@gmail.com>
Diffstat (limited to 'drivers/leds')
-rw-r--r-- | drivers/leds/leds-mc13783.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/leds/leds-mc13783.c b/drivers/leds/leds-mc13783.c index 85c3714e1b5a..e2b847fe22a1 100644 --- a/drivers/leds/leds-mc13783.c +++ b/drivers/leds/leds-mc13783.c @@ -134,9 +134,7 @@ static struct mc13xxx_leds_platform_data __init *mc13xxx_led_probe_dt( if (!pdata) return ERR_PTR(-ENOMEM); - of_node_get(dev->parent->of_node); - - parent = of_find_node_by_name(dev->parent->of_node, "leds"); + parent = of_get_child_by_name(dev->parent->of_node, "leds"); if (!parent) goto out_node_put; |