linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hid: playstation: add LEDS_CLASS dependency
@ 2021-10-29 11:40 Arnd Bergmann
       [not found] ` <BY5PR13MB3826F4B874D9EE466B9FF18798879@BY5PR13MB3826.namprd13.prod.outlook.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2021-10-29 11:40 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires, Roderick Colenbrander
  Cc: Arnd Bergmann, Roderick Colenbrander, Barnabás Pőcze,
	Daniel J. Ogorchock, linux-input, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

The new LED support causes a link failure when the LEDS subsystem
is in a loadable module and the playstation HID driver is built-in:

ld.lld: error: undefined symbol: devm_led_classdev_multicolor_register_ext
>>> referenced by hid-playstation.c
>>>               hid/hid-playstation.o:(ps_lightbar_register) in archive drivers/built-in.a

Add a hard Kconfig dependency on LEDS_CLASS, but allow building with
the multicolor support disabled, as this is apparently meant as an
optional interface.

Fixes: 8c0ab553b072 ("HID: playstation: expose DualSense player LEDs through LED class.")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/hid/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index a2c3d9b7bd01..cd10c398580e 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -899,6 +899,8 @@ config HID_PLANTRONICS
 config HID_PLAYSTATION
 	tristate "PlayStation HID Driver"
 	depends on HID
+	depends on LEDS_CLASS
+	depends on LEDS_CLASS_MULTICOLOR || !LEDS_CLASS_MULTICOLOR
 	select CRC32
 	select POWER_SUPPLY
 	help
-- 
2.29.2


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

* Re: [PATCH] hid: playstation: add LEDS_CLASS dependency
       [not found] ` <BY5PR13MB3826F4B874D9EE466B9FF18798879@BY5PR13MB3826.namprd13.prod.outlook.com>
@ 2021-11-01 14:37   ` Jiri Kosina
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2021-11-01 14:37 UTC (permalink / raw)
  To: Roderick.Colenbrander
  Cc: arnd, benjamin.tissoires, roderick, arnd, pobrn, djogorchock,
	linux-input, linux-kernel

On Fri, 29 Oct 2021, Roderick.Colenbrander@sony.com wrote:

> Thanks you beat me into looking at this. Something like this got dropped through all the iterations this went through earlier this year.
> 
> I would maybe prefer to make this a hard dependency on multicolor. If 
> conditional not all devices will enable it. We have had various issues 
> already on e.g. Android were some vendors didn't set certain options.

Ah, sorry, I've seen the mail from 0day bot first before Arnd's mail, and 
the fix (adding hard dependency on LEDS_CLASS_MULTICOLOR) is already 
pushed out.

Thanks,

-- 
Jiri Kosina
SUSE Labs


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

end of thread, other threads:[~2021-11-01 14:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-29 11:40 [PATCH] hid: playstation: add LEDS_CLASS dependency Arnd Bergmann
     [not found] ` <BY5PR13MB3826F4B874D9EE466B9FF18798879@BY5PR13MB3826.namprd13.prod.outlook.com>
2021-11-01 14:37   ` Jiri Kosina

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).