OSDN Git Service

leds: lm36274: don't iterate through children since there is only one
authorMarek Behún <marek.behun@nic.cz>
Sat, 19 Sep 2020 18:02:57 +0000 (20:02 +0200)
committerPavel Machek <pavel@ucw.cz>
Sat, 26 Sep 2020 19:56:43 +0000 (21:56 +0200)
commita448fcf19c9c5d3ddd9066accbd8d28c4950bb9f
treeabcc2590b9e52a19288b8627c4ad6198e24a8b68
parentd3ab963cf980151f5f0ba16d842ddc80b232d9c0
leds: lm36274: don't iterate through children since there is only one

Do not use device_for_each_child_node. Since this driver works only with
once child node present, use device_get_next_child_node instead.
This also saves one level of indentation.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Dan Murphy <dmurphy@ti.com>
Tested-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
drivers/leds/leds-lm36274.c