Skip to contentSkip to conversation

platform/x86: acer_wmi: Cleanup Kconfig selects

PATCH In review Hans de Goede 2 participants 5 messages Jun 20, 2022 – Jun 22, 2022 x86 platform drivers

lore
Share & tools
lore
#0 lore raw

PATCH v2 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 nonsense.

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 v2 2/3 platform/x86: Kconfig: Remove unnecessary "if X86"

drivers/platform/x86/Kconfig is wrapped in one big
if X86_PLATFORM_DEVICES .. endif and X86_PLATFORM_DEVICES already has a "depends on X86" so the "if X86" in drivers/platform/Kconfig is not necessary and except for mips non of the other includes there has such an if. So lets remove it.

While at it also move the x86/Kconfig include to the end of the file for alphabetical sorting.

---
Changes in v2:
- Drop "if X86" from drivers/platform/Kconfig instead of dropping the "depends on X86" from X86_PLATFORM_DEVICES

---
 drivers/platform/Kconfig | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/platform/Kconfig +2 -3
index 18fc6a08569e..b437847b6237 100644
@@ -1,7 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0-only
-if X86
-source "drivers/platform/x86/Kconfig"
-endif
 if MIPS
 source "drivers/platform/mips/Kconfig"
 endif
@@ -15,3 +12,5 @@ source "drivers/platform/mellanox/Kconfig"
 source "drivers/platform/olpc/Kconfig"
 
 source "drivers/platform/surface/Kconfig"
+
+source "drivers/platform/x86/Kconfig"
Signature · 1 line
2.36.0
Reviewed-by on v2 2/3
#2 lore raw

Re: [PATCH v2 2/3] platform/x86: Kconfig: Remove unnecessary "if X86"

Quoted 5 lines · Hans de Goede

drivers/platform/x86/Kconfig is wrapped in one big
if X86_PLATFORM_DEVICES .. endif and X86_PLATFORM_DEVICES already has a "depends on X86" so the "if X86" in drivers/platform/Kconfig is not necessary and except for mips non of the other includes

MIPS
none ?

Quoted 1 line

there has such an if. So lets remove it.

let's

Quoted 2 lines

While at it also move the x86/Kconfig include to the end of the file for alphabetical sorting.

Quoted 30 lines

---
Changes in v2:
- Drop "if X86" from drivers/platform/Kconfig instead of dropping the "depends on X86" from X86_PLATFORM_DEVICES

---
 drivers/platform/Kconfig | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/platform/Kconfig +2 -4
index 18fc6a08569e..b437847b6237 100644
@@ -1,7 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0-only
-if X86
-source "drivers/platform/x86/Kconfig"
-endif
 if MIPS
 source "drivers/platform/mips/Kconfig"
 endif
@@ -15,3 +12,5 @@ source "drivers/platform/mellanox/Kconfig"
 source "drivers/platform/olpc/Kconfig"
 
 source "drivers/platform/surface/Kconfig"
+
+source "drivers/platform/x86/Kconfig"
--

2.36.0

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

Re: [PATCH v2 2/3] platform/x86: Kconfig: Remove unnecessary "if X86"

Hi,

Quoted 7 lines · Andy Shevchenko
Quoted 5 lines · Hans de Goede

drivers/platform/x86/Kconfig is wrapped in one big
if X86_PLATFORM_DEVICES .. endif and X86_PLATFORM_DEVICES already has a "depends on X86" so the "if X86" in drivers/platform/Kconfig is not necessary and except for mips non of the other includes

Quoted 7 lines

MIPS
none ?

Quoted 1 line

there has such an if. So lets remove it.

let's

Both fixed up.

Quoted 5 lines
Quoted 2 lines

While at it also move the x86/Kconfig include to the end of the file for alphabetical sorting.

Thanks, I've pushed this series to my review-hans branch now.

Regards,

Hans

Quoted 33 lines
Quoted 31 lines

---
Changes in v2:
- Drop "if X86" from drivers/platform/Kconfig instead of dropping the "depends on X86" from X86_PLATFORM_DEVICES

---
 drivers/platform/Kconfig | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/platform/Kconfig +2 -4
index 18fc6a08569e..b437847b6237 100644
@@ -1,7 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0-only
-if X86
-source "drivers/platform/x86/Kconfig"
-endif
 if MIPS
 source "drivers/platform/mips/Kconfig"
 endif
@@ -15,3 +12,5 @@ source "drivers/platform/mellanox/Kconfig"
 source "drivers/platform/olpc/Kconfig"
 
 source "drivers/platform/surface/Kconfig"
+
+source "drivers/platform/x86/Kconfig"
--

2.36.0

#4 lore raw

PATCH v2 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