Skip to content

Commit 5070307

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 1638a9a commit 5070307

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
@@ -597,8 +597,7 @@ config HID_LED
597597

598598
config HID_LENOVO
599599
tristate "Lenovo / Thinkpad devices"
600-
depends on ACPI
601-
select ACPI_PLATFORM_PROFILE
600+
select ACPI_PLATFORM_PROFILE if ACPI
602601
select NEW_LEDS
603602
select LEDS_CLASS
604603
help

drivers/hid/hid-lenovo.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -734,8 +734,11 @@ static int lenovo_raw_event_TP_X12_tab(struct hid_device *hdev, u32 raw_data)
734734
report_key_event(input, KEY_RFKILL);
735735
return 1;
736736
}
737-
platform_profile_cycle();
738-
return 1;
737+
if (IS_ENABLED(CONFIG_ACPI_PLATFORM_PROFILE)) {
738+
platform_profile_cycle();
739+
return 1;
740+
}
741+
return 0;
739742
case TP_X12_RAW_HOTKEY_FN_F10:
740743
/* TAB1 has PICKUP Phone and TAB2 use Snipping tool*/
741744
(hdev->product == USB_DEVICE_ID_LENOVO_X12_TAB) ?

0 commit comments

Comments
 (0)