[lkml]   [2021]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] leds: rt8515: add V4L2_FLASH_LED_CLASS dependency
From: Arnd Bergmann <>

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

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: e1c6edcbea13 ("leds: rt8515: Add Richtek RT8515 LED driver")
Signed-off-by: Arnd Bergmann <>
drivers/leds/flash/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/leds/flash/Kconfig b/drivers/leds/flash/Kconfig
index d21d273ef3da..b580b416b9a4 100644
--- a/drivers/leds/flash/Kconfig
+++ b/drivers/leds/flash/Kconfig
@@ -5,6 +5,7 @@ if LEDS_CLASS_FLASH
config LEDS_RT8515
tristate "LED support for Richtek RT8515 flash/torch LED"
depends on GPIOLIB
This option enables support for the Richtek RT8515 flash
and torch LEDs found on some mobile phones.
 \ /
  Last update: 2021-02-04 16:43    [W:0.044 / U:0.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site