Skip to content

Commit 58eebe0

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 db9fa17 commit 58eebe0

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

drivers/hid/Kconfig

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

596596
config HID_LENOVO
597597
tristate "Lenovo / Thinkpad devices"
598-
depends on ACPI
599-
select ACPI_PLATFORM_PROFILE
598+
select ACPI_PLATFORM_PROFILE if ACPI
600599
select NEW_LEDS
601600
select LEDS_CLASS
602601
help

drivers/hid/hid-lenovo.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -729,8 +729,11 @@ static int lenovo_raw_event_TP_X12_tab(struct hid_device *hdev, u32 raw_data)
729729
report_key_event(input, KEY_RFKILL);
730730
return 1;
731731
}
732-
platform_profile_cycle();
733-
return 1;
732+
if (IS_ENABLED(CONFIG_ACPI_PLATFORM_PROFILE)) {
733+
platform_profile_cycle();
734+
return 1;
735+
}
736+
return 0;
734737
case TP_X12_RAW_HOTKEY_FN_F10:
735738
/* TAB1 has PICKUP Phone and TAB2 use Snipping tool*/
736739
(hdev->product == USB_DEVICE_ID_LENOVO_X12_TAB) ?

0 commit comments

Comments
 (0)