Skip to contentSkip to conversation

ideapad-laptop: Depend on BACKLIGHT_CLASS_DEVICE instead of selecting it

PATCH In review Matthew Garrett 2 participants 2 messages Feb 25, 2013 – Feb 26, 2013 x86 platform drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ideapad-laptop: Depend on BACKLIGHT_CLASS_DEVICE instead of selecting it

Selecting BACKLIGHT_CLASS_DEVICE doesn't guarantee that any of its dependencies are enabled, and these are complicated. Depending isn't ideal for configuration UI purposes, but is probably more appropriate here.

---
 drivers/platform/x86/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/Kconfig +1 -1
index 242c524..3338437 100644
@@ -299,8 +299,8 @@ config IDEAPAD_LAPTOP
 	depends on ACPI
 	depends on RFKILL && INPUT
 	depends on SERIO_I8042
+	depends on BACKLIGHT_CLASS_DEVICE
 	select INPUT_SPARSEKMAP
-	select BACKLIGHT_CLASS_DEVICE
 	help
 	  This is a driver for Lenovo IdeaPad netbooks contains drivers for
 	  rfkill switch, hotkey, fan control and backlight control.
Signature · 1 line
1.8.1.2
Acked-by on v1 1/1
#1 lore raw
Quoted 15 lines · Matthew Garrett

Selecting BACKLIGHT_CLASS_DEVICE doesn't guarantee that any of its dependencies are enabled, and these are complicated. Depending isn't ideal for configuration UI purposes, but is probably more appropriate here.

---
 drivers/platform/x86/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/Kconfig +0 -0
index 242c524..3338437 100644

drivers/platform/x86/Kconfig config IDEAPAD_LAPTOP · line 306

Quoted 9 lines
drivers/platform/x86/Kconfig +1 -1
@@ -299,8 +299,8 @@ config IDEAPAD_LAPTOP
 	depends on ACPI
 	depends on RFKILL && INPUT
 	depends on SERIO_I8042
+	depends on BACKLIGHT_CLASS_DEVICE
 	select INPUT_SPARSEKMAP
-	select BACKLIGHT_CLASS_DEVICE
 	help
 	  This is a driver for Lenovo IdeaPad netbooks contains drivers for
 	  rfkill switch, hotkey, fan control and backlight control.

It might be worthy to consider to apply the same modification for ASUS_LAPTOP, SONY_LAPTOP, EEEPC_LAPTOP, ACPI_CMPC, SAMSUNG_Q10 and THINKPAD_ACPI to avoid the warning.