Skip to content

Commit fdcbc56

Browse files
committed
HID: lenovo: Remove CONFIG_ACPI dependency
The hid-lenovo driver supports external Bluetooth and USB devices which can be used with non-ACPI systems/kernels. Call platform_profile_cycle() only if CONFIG_ACPI_PLATFORM_PROFILE is enabled and select CONFIG_ACPI_PLATFORM_PROFILE only if ACPI is enabled. This should not affect functionality since only the detachable keyboard of a x86 tablet with a custom connector has an hotkey for cycling through power profiles. Fixes: 52572cd ("HID: lenovo: select CONFIG_ACPI_PLATFORM_PROFILE") Signed-off-by: Janne Grunau <j@jannau.net>
1 parent 30f7cb1 commit fdcbc56

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

drivers/hid/Kconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -570,8 +570,7 @@ config HID_LED
570570

571571
config HID_LENOVO
572572
tristate "Lenovo / Thinkpad devices"
573-
depends on ACPI
574-
select ACPI_PLATFORM_PROFILE
573+
select ACPI_PLATFORM_PROFILE if ACPI
575574
select NEW_LEDS
576575
select LEDS_CLASS
577576
help

drivers/hid/hid-lenovo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ static int lenovo_raw_event_TP_X12_tab(struct hid_device *hdev, u32 raw_data)
728728
if (hdev->product == USB_DEVICE_ID_LENOVO_X12_TAB) {
729729
report_key_event(input, KEY_RFKILL);
730730
return 1;
731-
} else {
731+
} else if (IS_ENABLED(CONFIG_ACPI_PLATFORM_PROFILE)) {
732732
platform_profile_cycle();
733733
return 1;
734734
}

0 commit comments

Comments
 (0)