Skip to content

Commit dbeb02a

Browse files
arndbpavelmachek
authored andcommitted
leds: rt8515: add V4L2_FLASH_LED_CLASS dependency
The leds-rt8515 driver can optionall use the v4l2 flash led class, but it causes a link error when that class is in a loadable module and the rt8515 driver itself is built-in: ld.lld: error: undefined symbol: v4l2_flash_init >>> referenced by leds-rt8515.c >>> leds/flash/leds-rt8515.o:(rt8515_probe) in archive drivers/built-in.a Adding 'depends on V4L2_FLASH_LED_CLASS' in Kconfig would avoid that, but it would make it impossible to use the driver without the v4l2 support. Add the same dependency that the other users of this class have instead, which just prevents the broken configuration. Fixes: e1c6edc ("leds: rt8515: Add Richtek RT8515 LED driver") Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Pavel Machek <[email protected]>
1 parent 92bf226 commit dbeb02a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/leds/flash/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ if LEDS_CLASS_FLASH
55
config LEDS_RT8515
66
tristate "LED support for Richtek RT8515 flash/torch LED"
77
depends on GPIOLIB
8+
depends on V4L2_FLASH_LED_CLASS || !V4L2_FLASH_LED_CLASS
89
help
910
This option enables support for the Richtek RT8515 flash
1011
and torch LEDs found on some mobile phones.

0 commit comments

Comments
 (0)