]> git.baikalelectronics.ru Git - kernel.git/commit
leds: rt8515: add V4L2_FLASH_LED_CLASS dependency
authorArnd Bergmann <arnd@arndb.de>
Thu, 4 Feb 2021 15:39:44 +0000 (16:39 +0100)
committerPavel Machek <pavel@ucw.cz>
Sun, 14 Feb 2021 17:01:41 +0000 (18:01 +0100)
commitfda24a991e7ce9088eda0c75f8af2f1868fe8383
treebd5d0ca6df22385d6a9a576f69e1e252b4b5692d
parent85fd09d4b3b21becfbc020f4eaa7530f9eefd0d8
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: b1c3597989ce ("leds: rt8515: Add Richtek RT8515 LED driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
drivers/leds/flash/Kconfig