From 87e236845a3415eb7a7bc6600657c494abe41390 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Mon, 17 Aug 2020 12:11:29 -0700 Subject: leds: LP55XX_COMMON needs to depend on LEDS_CLASS With these kernel configs: CONFIG_LEDS_CLASS=m # CONFIG_LEDS_CLASS_MULTICOLOR is not set CONFIG_LEDS_LP55XX_COMMON=y CONFIG_LEDS_LP5521=m CONFIG_LEDS_LP5562=m leds-lp55xx-common.c has a build error because it is builtin and calls an interface that is built as a loadable module (due to LEDS_CLASS=m). By making LEDS_LP55XX_COMMON depend on LEDS_CLASS, this config combination cannot happen, thus preventing the build error. ld: drivers/leds/leds-lp55xx-common.o: in function `lp55xx_register_leds': leds-lp55xx-common.c:(.text+0xc5f): undefined reference to `devm_led_classdev_register_ext' Fixes: 33b3a561f417 ("leds: support new LP8501 device - another LP55xx common") Signed-off-by: Randy Dunlap Cc: Pavel Machek Cc: Dan Murphy Cc: Milo Kim Cc: linux-leds@vger.kernel.org Signed-off-by: Pavel Machek --- drivers/leds/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/leds') diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig index 1c181df24eae..3c54debfc432 100644 --- a/drivers/leds/Kconfig +++ b/drivers/leds/Kconfig @@ -397,6 +397,7 @@ config LEDS_LP3952 config LEDS_LP55XX_COMMON tristate "Common Driver for TI/National LP5521/5523/55231/5562/8501" + depends on LEDS_CLASS depends on LEDS_CLASS_MULTICOLOR || !LEDS_CLASS_MULTICOLOR depends on OF depends on I2C -- cgit v1.2.3