Skip to content

Commit 19acad7

Browse files
arndbJiri Kosina
authored andcommitted
HID: hid-lenovo-go: fix LEDS dependencies
The newly added hid-lenovo-go and hid-lenovo-go-s drivers attempt to 'select LEDS_CLASS', which has a dependency on NEW_LEDS, causing a build failure when NEW_LEDS itself it disabled: WARNING: unmet direct dependencies detected for LEDS_CLASS Depends on [n]: NEW_LEDS [=n] Selected by [m]: - HID_LENOVO_GO [=m] && HID_SUPPORT [=y] && HID [=m] && USB_HID [=m] - HID_LENOVO_GO_S [=m] && HID_SUPPORT [=y] && HID [=m] && USB_HID [=m] WARNING: unmet direct dependencies detected for LEDS_CLASS_MULTICOLOR Depends on [n]: NEW_LEDS [=n] && LEDS_CLASS [=m] Selected by [m]: - HID_LENOVO_GO [=m] && HID_SUPPORT [=y] && HID [=m] && USB_HID [=m] - HID_LENOVO_GO_S [=m] && HID_SUPPORT [=y] && HID [=m] && USB_HID [=m] ERROR: modpost: "led_set_brightness_nopm" [drivers/leds/led-class.ko] undefined! ERROR: modpost: "led_set_brightness" [drivers/leds/led-class.ko] undefined! ERROR: modpost: "led_get_color_name" [drivers/leds/led-class-multicolor.ko] undefined! ERROR: modpost: "led_set_brightness" [drivers/leds/led-class-multicolor.ko] undefined! Device drivers generally should not select other subsystems like this, as that tends to cause dependency problems including loops in the dependency graph. Change these two and the older hid-lenovo driver to behave the same way as all other HID drivers and use 'depends on LEDS_CLASS' or 'depends on LEDS_CLASS_MULTICOLOR' instead, which itself has NEW_LEDS and LEDS_CLASS as dependencies. Fixes: a23f349 ("HID: hid-lenovo-go-s: Add Lenovo Legion Go S Series HID Driver") Fixes: d69ccfc ("HID: hid-lenovo-go: Add Lenovo Legion Go Series HID Driver") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Signed-off-by: Jiri Kosina <jkosina@suse.com>
1 parent dd80009 commit 19acad7

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

drivers/hid/Kconfig

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -610,8 +610,7 @@ config HID_LED
610610

611611
config HID_LENOVO
612612
tristate "Lenovo / Thinkpad devices"
613-
select NEW_LEDS
614-
select LEDS_CLASS
613+
depends on LEDS_CLASS
615614
help
616615
Support for IBM/Lenovo devices that are not fully compliant with HID standard.
617616

@@ -626,8 +625,7 @@ config HID_LENOVO
626625
config HID_LENOVO_GO
627626
tristate "HID Driver for Lenovo Legion Go Series Controllers"
628627
depends on USB_HID
629-
select LEDS_CLASS
630-
select LEDS_CLASS_MULTICOLOR
628+
depends on LEDS_CLASS_MULTICOLOR
631629
help
632630
Support for Lenovo Legion Go devices with detachable controllers.
633631

@@ -638,8 +636,7 @@ config HID_LENOVO_GO
638636
config HID_LENOVO_GO_S
639637
tristate "HID Driver for Lenovo Legion Go S Controller"
640638
depends on USB_HID
641-
select LEDS_CLASS
642-
select LEDS_CLASS_MULTICOLOR
639+
depends on LEDS_CLASS_MULTICOLOR
643640
help
644641
Support for Lenovo Legion Go S Handheld Console Controller.
645642

0 commit comments

Comments
 (0)