linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] leds: LP55XX_COMMON needs to depend on LEDS_CLASS
@ 2020-08-17 19:11 Randy Dunlap
  2020-08-17 20:28 ` Pavel Machek
  0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2020-08-17 19:11 UTC (permalink / raw)
  To: LKML, linux-leds, Pavel Machek, Dan Murphy; +Cc: Milo Kim

From: Randy Dunlap <rdunlap@infradead.org>

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 <rdunlap@infradead.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Dan Murphy <dmurphy@ti.com>
Cc: Milo Kim <milo.kim@ti.com>
Cc: linux-leds@vger.kernel.org
---
The Fixes: tag might be incorrect...  I also considered:
92a81562e695 ("leds: lp55xx: Add multicolor framework support to lp55xx")

 drivers/leds/Kconfig |    1 +
 1 file changed, 1 insertion(+)

--- linux-next-20200817.orig/drivers/leds/Kconfig
+++ linux-next-20200817/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


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

* Re: [PATCH] leds: LP55XX_COMMON needs to depend on LEDS_CLASS
  2020-08-17 19:11 [PATCH] leds: LP55XX_COMMON needs to depend on LEDS_CLASS Randy Dunlap
@ 2020-08-17 20:28 ` Pavel Machek
  0 siblings, 0 replies; 2+ messages in thread
From: Pavel Machek @ 2020-08-17 20:28 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: LKML, linux-leds, Dan Murphy, Milo Kim

[-- Attachment #1: Type: text/plain, Size: 1420 bytes --]

Hi!

> From: Randy Dunlap <rdunlap@infradead.org>
> 
> 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 <rdunlap@infradead.org>
> Cc: Pavel Machek <pavel@ucw.cz>
> Cc: Dan Murphy <dmurphy@ti.com>
> Cc: Milo Kim <milo.kim@ti.com>
> Cc: linux-leds@vger.kernel.org
> ---
> The Fixes: tag might be incorrect...  I also considered:
> 92a81562e695 ("leds: lp55xx: Add multicolor framework support to
> lp55xx")

Thanks, makes sense, I'll take this one. I believe the second fixes
tag is correct; not that it matters.

Thanks and best regards,
								Pavel
								
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

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

end of thread, other threads:[~2020-08-17 20:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-17 19:11 [PATCH] leds: LP55XX_COMMON needs to depend on LEDS_CLASS Randy Dunlap
2020-08-17 20:28 ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).