Skip to contentSkip to conversation

platform/x86: acer_wmi: Cleanup Kconfig selects

PATCH Superseded Hans de Goede 2 participants 7 messages Jun 20, 2022 x86 platform drivers

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 platform/x86: acer_wmi: Cleanup Kconfig selects

ACER_WMI already depends on ACPI_WMI which depends on ACPI so the "depends on ACPI" is unnecessary.

And since ACER_WMI already depends on ACPI adding an "if ACPI" to the ACPI_VIDEO select is non-sense.

While at it also group all the selects together.

---
 drivers/platform/x86/Kconfig | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/platform/x86/Kconfig +3 -5
index 08852a1cd51d..6e22ac916f7a 100644
@@ -177,17 +177,15 @@ config ACER_WIRELESS
 
 config ACER_WMI
 	tristate "Acer WMI Laptop Extras"
-	depends on ACPI
-	select LEDS_CLASS
-	select NEW_LEDS
 	depends on BACKLIGHT_CLASS_DEVICE
 	depends on SERIO_I8042
 	depends on INPUT
 	depends on RFKILL || RFKILL = n
 	depends on ACPI_WMI
+	select ACPI_VIDEO
 	select INPUT_SPARSEKMAP
-	# Acer WMI depends on ACPI_VIDEO when ACPI is enabled
-        select ACPI_VIDEO if ACPI
+	select LEDS_CLASS
+	select NEW_LEDS
 	help
 	  This is a driver for newer Acer (and Wistron) laptops. It adds
 	  wireless radio and bluetooth control, and on some laptops,
Signature · 1 line
2.36.0
#1 lore raw

PATCH 2/3 platform/x86: Kconfig: Remove unnecessary "depends on X86"

The sourcing of drivers/platform/x86/Kconfig is protected by a "if X86", so the "depends on X86" for X86_PLATFORM_DEVICES is unnecessary, remove it.

---
 drivers/platform/x86/Kconfig | 1 -
 1 file changed, 1 deletion(-)
drivers/platform/x86/Kconfig +0 -1
index 6e22ac916f7a..0f723c34a637 100644
@@ -6,7 +6,6 @@
 menuconfig X86_PLATFORM_DEVICES
 	bool "X86 Platform Specific Device Drivers"
 	default y
-	depends on X86
 	help
 	  Say Y here to get to see options for device drivers for various
 	  x86 platforms, including vendor-specific laptop extension drivers.
Signature · 1 line
2.36.0
#2 lore raw

Re: [PATCH 2/3] platform/x86: Kconfig: Remove unnecessary "depends on X86"

Quoted 4 lines · Hans de Goede

The sourcing of drivers/platform/x86/Kconfig is protected by a "if X86", so the "depends on X86" for X86_PLATFORM_DEVICES is unnecessary, remove it.

Looking into the upper Kconfig, I would rather go and drop dependency there to be consistent with the rest of drivers/platform/ cases. Perhaps it needs to be done separately for MIPS.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#3 lore raw

Re: [PATCH 2/3] platform/x86: Kconfig: Remove unnecessary "depends on X86"

Hi,

Quoted 8 lines · Andy Shevchenko
Quoted 4 lines · Hans de Goede

The sourcing of drivers/platform/x86/Kconfig is protected by a "if X86", so the "depends on X86" for X86_PLATFORM_DEVICES is unnecessary, remove it.

Looking into the upper Kconfig, I would rather go and drop dependency there to be consistent with the rest of drivers/platform/ cases.

I did consider doing things this way myself too :)

I'll go and prep a v2 of the series with this changed.

Quoted 1 line

Perhaps it needs to be done separately for MIPS.

That would make everything consistent, but I'll leave doing this to someone else.

Regards,

Hans

#4 lore raw

PATCH 3/3 platform/x86/dell: Kconfig: Remove unnecessary "depends on X86_PLATFORM_DEVICES"

In reply to Hans de Goede

platform/x86/dell/Kconfig is only sourced if X86_PLATFORM_DEVICES is set, so it does not need to depend on it.

---
 drivers/platform/x86/dell/Kconfig | 1 -
 1 file changed, 1 deletion(-)
drivers/platform/x86/dell/Kconfig +0 -1
index fe224a54f24c..25421e061c47 100644
@@ -5,7 +5,6 @@
 
 menuconfig X86_PLATFORM_DRIVERS_DELL
 	bool "Dell X86 Platform Specific Device Drivers"
-	depends on X86_PLATFORM_DEVICES
 	help
 	  Say Y here to get to see options for device drivers for various
 	  Dell x86 platforms, including vendor-specific laptop extension drivers.
Signature · 1 line
2.36.0
Reviewed-by on v1 3/3
#5 lore raw

Re: [PATCH 3/3] platform/x86/dell: Kconfig: Remove unnecessary "depends on X86_PLATFORM_DEVICES"

Quoted 3 lines · Hans de Goede

platform/x86/dell/Kconfig is only sourced if X86_PLATFORM_DEVICES is set, so it does not need to depend on it.

Quoted 20 lines
---
 drivers/platform/x86/dell/Kconfig | 1 -
 1 file changed, 1 deletion(-)
drivers/platform/x86/dell/Kconfig +0 -2
index fe224a54f24c..25421e061c47 100644
@@ -5,7 +5,6 @@
 
 menuconfig X86_PLATFORM_DRIVERS_DELL
        bool "Dell X86 Platform Specific Device Drivers"
-       depends on X86_PLATFORM_DEVICES
        help
          Say Y here to get to see options for device drivers for various
          Dell x86 platforms, including vendor-specific laptop extension drivers.
--

2.36.0

Signature · 2 lines
With Best Regards,
Andy Shevchenko
Reviewed-by on v1 1/3
#6 lore raw
In reply to Hans de Goede
Quoted 6 lines · Hans de Goede

ACER_WMI already depends on ACPI_WMI which depends on ACPI so the "depends on ACPI" is unnecessary.

And since ACER_WMI already depends on ACPI adding an "if ACPI" to the ACPI_VIDEO select is non-sense.

nonsense

Quoted 1 line

While at it also group all the selects together.

Quoted 33 lines
---
 drivers/platform/x86/Kconfig | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/platform/x86/Kconfig +3 -6
index 08852a1cd51d..6e22ac916f7a 100644
@@ -177,17 +177,15 @@ config ACER_WIRELESS
 
 config ACER_WMI
        tristate "Acer WMI Laptop Extras"
-       depends on ACPI
-       select LEDS_CLASS
-       select NEW_LEDS
        depends on BACKLIGHT_CLASS_DEVICE
        depends on SERIO_I8042
        depends on INPUT
        depends on RFKILL || RFKILL = n
        depends on ACPI_WMI
+       select ACPI_VIDEO
        select INPUT_SPARSEKMAP
-       # Acer WMI depends on ACPI_VIDEO when ACPI is enabled
-        select ACPI_VIDEO if ACPI
+       select LEDS_CLASS
+       select NEW_LEDS
        help
          This is a driver for newer Acer (and Wistron) laptops. It adds
          wireless radio and bluetooth control, and on some laptops,
--

2.36.0

Signature · 2 lines
With Best Regards,
Andy Shevchenko