public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] leds: blinkm: fix CONFIG_LEDS_CLASS_MULTICOLOR dependency
@ 2024-08-07  7:55 Arnd Bergmann
  2024-08-07 18:14 ` Joseph Strauss
  2024-08-16 16:05 ` (subset) " Lee Jones
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2024-08-07  7:55 UTC (permalink / raw)
  To: Pavel Machek, Lee Jones, Joseph Strauss
  Cc: Arnd Bergmann, Andy Shevchenko, Jernej Skrabec,
	Duje Mihanović, Thomas Weißschuh, Christian Marangi,
	Patrick Rudolph, George Stark, linux-leds, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

With CONFIG_LEDS_CLASS_MULTICOLOR=m, a builtin leds-blinkm driver causes
a link failure:

arm-linux-gnueabi-ld: drivers/leds/leds-blinkm.o: in function `blinkm_set_mc_brightness':
leds-blinkm.c:(.text.blinkm_set_mc_brightness+0xc): undefined reference to `led_mc_calc_color_components'

Add a more specific dependency that only allows multicoler mode to
be enabled for blinkm if it can build and link.

Fixes: 56e8c56c9af0 ("leds: Add multicolor support to BlinkM LED driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/leds/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
index 41214c9b93ba..818c8bdd047e 100644
--- a/drivers/leds/Kconfig
+++ b/drivers/leds/Kconfig
@@ -838,7 +838,7 @@ config LEDS_BLINKM
 config LEDS_BLINKM_MULTICOLOR
 	bool "Enable multicolor support for BlinkM I2C RGB LED"
 	depends on LEDS_BLINKM
-	depends on LEDS_CLASS_MULTICOLOR
+	depends on LEDS_CLASS_MULTICOLOR=y || LEDS_CLASS_MULTICOLOR=LEDS_BLINKM
 	help
 	  This option enables multicolor sysfs class support for BlinkM LED and
 	  disables the older, separated sysfs interface
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] leds: blinkm: fix CONFIG_LEDS_CLASS_MULTICOLOR dependency
  2024-08-07  7:55 [PATCH] leds: blinkm: fix CONFIG_LEDS_CLASS_MULTICOLOR dependency Arnd Bergmann
@ 2024-08-07 18:14 ` Joseph Strauss
  2024-08-16 16:05 ` (subset) " Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Joseph Strauss @ 2024-08-07 18:14 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: pavel, lee, andriy.shevchenko, jernej.skrabec, duje.mihanovic,
	linux, ansuelsmth, patrick.rudolph, gnstark, linux-leds,
	linux-kernel

On 24/08/07 09:55AM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> With CONFIG_LEDS_CLASS_MULTICOLOR=m, a builtin leds-blinkm driver causes
> a link failure:
> 
> arm-linux-gnueabi-ld: drivers/leds/leds-blinkm.o: in function `blinkm_set_mc_brightness':
> leds-blinkm.c:(.text.blinkm_set_mc_brightness+0xc): undefined reference to `led_mc_calc_color_components'
> 
> Add a more specific dependency that only allows multicoler mode to
> be enabled for blinkm if it can build and link.
> 
> Fixes: 56e8c56c9af0 ("leds: Add multicolor support to BlinkM LED driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/leds/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
> index 41214c9b93ba..818c8bdd047e 100644
> --- a/drivers/leds/Kconfig
> +++ b/drivers/leds/Kconfig
> @@ -838,7 +838,7 @@ config LEDS_BLINKM
>  config LEDS_BLINKM_MULTICOLOR
>  	bool "Enable multicolor support for BlinkM I2C RGB LED"
>  	depends on LEDS_BLINKM
> -	depends on LEDS_CLASS_MULTICOLOR
> +	depends on LEDS_CLASS_MULTICOLOR=y || LEDS_CLASS_MULTICOLOR=LEDS_BLINKM
>  	help
>  	  This option enables multicolor sysfs class support for BlinkM LED and
>  	  disables the older, separated sysfs interface
> -- 
> 2.39.2
> 
Hi,

I was able to reproduce the issue and the fix works. Thank you!

Acked-by: Joseph Strauss <jstrauss@mailbox.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: (subset) [PATCH] leds: blinkm: fix CONFIG_LEDS_CLASS_MULTICOLOR dependency
  2024-08-07  7:55 [PATCH] leds: blinkm: fix CONFIG_LEDS_CLASS_MULTICOLOR dependency Arnd Bergmann
  2024-08-07 18:14 ` Joseph Strauss
@ 2024-08-16 16:05 ` Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Lee Jones @ 2024-08-16 16:05 UTC (permalink / raw)
  To: Pavel Machek, Lee Jones, Joseph Strauss, Arnd Bergmann
  Cc: Arnd Bergmann, Andy Shevchenko, Jernej Skrabec,
	Duje Mihanović, Thomas Weißschuh, Christian Marangi,
	Patrick Rudolph, George Stark, linux-leds, linux-kernel

On Wed, 07 Aug 2024 09:55:53 +0200, Arnd Bergmann wrote:
> With CONFIG_LEDS_CLASS_MULTICOLOR=m, a builtin leds-blinkm driver causes
> a link failure:
> 
> arm-linux-gnueabi-ld: drivers/leds/leds-blinkm.o: in function `blinkm_set_mc_brightness':
> leds-blinkm.c:(.text.blinkm_set_mc_brightness+0xc): undefined reference to `led_mc_calc_color_components'
> 
> Add a more specific dependency that only allows multicoler mode to
> be enabled for blinkm if it can build and link.
> 
> [...]

Applied, thanks!

[1/1] leds: blinkm: fix CONFIG_LEDS_CLASS_MULTICOLOR dependency
      commit: 17c40f3c94bc2279b879ea9ceb3eea973bcd1ac4

--
Lee Jones [李琼斯]


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-08-16 16:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-07  7:55 [PATCH] leds: blinkm: fix CONFIG_LEDS_CLASS_MULTICOLOR dependency Arnd Bergmann
2024-08-07 18:14 ` Joseph Strauss
2024-08-16 16:05 ` (subset) " Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox