Skip to contentSkip to conversation

leds: tps6131x: add V4L2_FLASH_LED_CLASS dependency

PATCH Applied Arnd Bergmann 3 participants 3 messages Jun 20, 2025 – Jul 1, 2025 LED

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 leds: tps6131x: add V4L2_FLASH_LED_CLASS dependency

From: Arnd Bergmann <[email protected]>

This driver can optionally use the v4l2_flash infrastructure, but fails to link built=in if that is in a loadable module:

ld.lld-21: error: undefined symbol: v4l2_flash_release

Quoted 1 line
Quoted 1 line
Quoted 1 line

referenced by leds-tps6131x.c:792 (drivers/leds/flash/leds-tps6131x.c:792)

Add the usual Kconfig dependency for it, still allowing it to be built when CONFIG_V4L2_FLASH_LED_CLASS is disabled.

Fixes b338a2ae9b31 ("leds: tps6131x: Add support for Texas Instruments TPS6131X flash LED driver")
---
 drivers/leds/flash/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/leds/flash/Kconfig +1 -0
index 55ca663ca506..5e08102a6784 100644
@@ -136,6 +136,7 @@ config LEDS_TPS6131X
 	tristate "LED support for TI TPS6131x flash LED driver"
 	depends on I2C && OF
 	depends on GPIOLIB
+	depends on V4L2_FLASH_LED_CLASS || !V4L2_FLASH_LED_CLASS
 	select REGMAP_I2C
 	help
 	  This option enables support for Texas Instruments TPS61310/TPS61311
Signature · 1 line
2.39.5
Reviewed-by Tested-by on v1 1/1
#1 lore raw
Quoted 5 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

This driver can optionally use the v4l2_flash infrastructure, but fails to link built=in if that is in a loadable module:

Quoted 8 lines

ld.lld-21: error: undefined symbol: v4l2_flash_release

Quoted 1 line
Quoted 1 line
Quoted 1 line

referenced by leds-tps6131x.c:792 (drivers/leds/flash/leds-tps6131x.c:792)

Add the usual Kconfig dependency for it, still allowing it to be built when CONFIG_V4L2_FLASH_LED_CLASS is disabled.

Fixes b338a2ae9b31 ("leds: tps6131x: Add support for Texas Instruments TPS6131X flash LED driver")

I just made this same patch, so

Thanks.

Quoted 16 lines
---
 drivers/leds/flash/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/leds/flash/Kconfig +1 -0
index 55ca663ca506..5e08102a6784 100644
@@ -136,6 +136,7 @@ config LEDS_TPS6131X
 	tristate "LED support for TI TPS6131x flash LED driver"
 	depends on I2C && OF
 	depends on GPIOLIB
+	depends on V4L2_FLASH_LED_CLASS || !V4L2_FLASH_LED_CLASS
 	select REGMAP_I2C
 	help
 	  This option enables support for Texas Instruments TPS61310/TPS61311
Signature · 1 line
~Randy
maintainer Applied
#2 lore raw

Re: (subset) [PATCH] leds: tps6131x: add V4L2_FLASH_LED_CLASS dependency

In reply to Arnd Bergmann
Quoted 10 lines · Arnd Bergmann

This driver can optionally use the v4l2_flash infrastructure, but fails to link built=in if that is in a loadable module:

ld.lld-21: error: undefined symbol: v4l2_flash_release

Quoted 1 line
Quoted 1 line
Quoted 1 line

referenced by leds-tps6131x.c:792 (drivers/leds/flash/leds-tps6131x.c:792)

Add the usual Kconfig dependency for it, still allowing it to be built when CONFIG_V4L2_FLASH_LED_CLASS is disabled.

[...]

Applied, thanks!

[1/1] leds: tps6131x: add V4L2_FLASH_LED_CLASS dependency

      commit: c3c38e80016548685e439b23999b4f0bd0ad7e05

--
Lee Jones [李琼斯]