1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00

HID: lenovo: select CONFIG_ACPI_PLATFORM_PROFILE

A previous patch tried to fix this link failure:

x86_64-linux-ld: drivers/hid/hid-lenovo.o: in function `lenovo_raw_event':
hid-lenovo.c:(.text+0x22c): undefined reference to `platform_profile_cycle'

but got it wrong in three ways:

 - the link failure still exists with CONFIG_ACPI_PLATFORM_PROFILE=m
   when hid-lenovo is built-in

 - There is no way to manually enable CONFIG_ACPI_PLATFORM_PROFILE, as
   it is intended to be selected by its users.

Remove the broken #if check again and instead select the symbol like
the other users do. This requires adding a dependency on CONFIG_ACPI.

Fixes: 52e7d1f7c2 ("HID: lenovo: Fix undefined platform_profile_cycle in ThinkPad X12 keyboard patch")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
This commit is contained in:
Arnd Bergmann 2025-01-22 07:50:57 +01:00 committed by Jiri Kosina
parent 7e0d1cff12
commit 52572cde8b
2 changed files with 3 additions and 6 deletions

View file

@ -570,6 +570,8 @@ config HID_LED
config HID_LENOVO
tristate "Lenovo / Thinkpad devices"
depends on ACPI
select ACPI_PLATFORM_PROFILE
select NEW_LEDS
select LEDS_CLASS
help

View file

@ -32,9 +32,7 @@
#include <linux/leds.h>
#include <linux/workqueue.h>
#if IS_ENABLED(CONFIG_ACPI_PLATFORM_PROFILE)
#include <linux/platform_profile.h>
#endif /* CONFIG_ACPI_PLATFORM_PROFILE */
#include "hid-ids.h"
@ -730,13 +728,10 @@ static int lenovo_raw_event_TP_X12_tab(struct hid_device *hdev, u32 raw_data)
if (hdev->product == USB_DEVICE_ID_LENOVO_X12_TAB) {
report_key_event(input, KEY_RFKILL);
return 1;
}
#if IS_ENABLED(CONFIG_ACPI_PLATFORM_PROFILE)
else {
} else {
platform_profile_cycle();
return 1;
}
#endif /* CONFIG_ACPI_PLATFORM_PROFILE */
return 0;
case TP_X12_RAW_HOTKEY_FN_F10:
/* TAB1 has PICKUP Phone and TAB2 use Snipping tool*/