]> git.baikalelectronics.ru Git - uboot.git/commit
led: gpio: Check device compatible string to determine the top level node
authorMarek Vasut <marex@denx.de>
Fri, 22 Apr 2022 13:15:55 +0000 (15:15 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 28 Apr 2022 13:26:43 +0000 (09:26 -0400)
commit120383efe8689283f14374cb25ccfcd0dc7d872e
tree9629063d9896b3081b11fcc1551bf852afa90387
parente1c2b1a231798bce8c3bf24a49859bea69d6b657
led: gpio: Check device compatible string to determine the top level node

Since 87d0e5d4c05 ("led: gpio: Drop duplicate OF "label" property parsing"),
all LED nodes have some sort of label. Use device_is_compatible(..."leds-gpio")
to determine whether this is a top-level node, since it is only the top
level node which is compatible with "leds-gpio", the GPIO LEDs subnodes
are not.

Fixes: 87d0e5d4c05 ("led: gpio: Drop duplicate OF "label" property parsing")
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Cc: Sean Anderson <seanga2@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Steven Lawrance <steven.lawrance@softathome.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Tested-by: Patrice Chotard <patrice.chotard@foss.st.com>
drivers/led/led_gpio.c