Commit 17c40f3c authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Lee Jones

leds: blinkm: Fix CONFIG_LEDS_CLASS_MULTICOLOR dependency

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: 56e8c56c ("leds: Add multicolor support to BlinkM LED driver")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarJoseph Strauss <jstrauss@mailbox.org>
Link: https://lore.kernel.org/r/20240807075614.2118068-1-arnd@kernel.orgSigned-off-by: default avatarLee Jones <lee@kernel.org>
parent 82c5ada1
...@@ -828,7 +828,7 @@ config LEDS_BLINKM ...@@ -828,7 +828,7 @@ config LEDS_BLINKM
config LEDS_BLINKM_MULTICOLOR config LEDS_BLINKM_MULTICOLOR
bool "Enable multicolor support for BlinkM I2C RGB LED" bool "Enable multicolor support for BlinkM I2C RGB LED"
depends on LEDS_BLINKM depends on LEDS_BLINKM
depends on LEDS_CLASS_MULTICOLOR depends on LEDS_CLASS_MULTICOLOR=y || LEDS_CLASS_MULTICOLOR=LEDS_BLINKM
help help
This option enables multicolor sysfs class support for BlinkM LED and This option enables multicolor sysfs class support for BlinkM LED and
disables the older, separated sysfs interface disables the older, separated sysfs interface
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment