Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 52e7d1f7c2fd ("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>

authored by

Arnd Bergmann and committed by
Jiri Kosina
52572cde 7e0d1cff

+3 -6
+2
drivers/hid/Kconfig
··· 570 570 571 571 config HID_LENOVO 572 572 tristate "Lenovo / Thinkpad devices" 573 + depends on ACPI 574 + select ACPI_PLATFORM_PROFILE 573 575 select NEW_LEDS 574 576 select LEDS_CLASS 575 577 help
+1 -6
drivers/hid/hid-lenovo.c
··· 32 32 #include <linux/leds.h> 33 33 #include <linux/workqueue.h> 34 34 35 - #if IS_ENABLED(CONFIG_ACPI_PLATFORM_PROFILE) 36 35 #include <linux/platform_profile.h> 37 - #endif /* CONFIG_ACPI_PLATFORM_PROFILE */ 38 36 39 37 #include "hid-ids.h" 40 38 ··· 728 730 if (hdev->product == USB_DEVICE_ID_LENOVO_X12_TAB) { 729 731 report_key_event(input, KEY_RFKILL); 730 732 return 1; 731 - } 732 - #if IS_ENABLED(CONFIG_ACPI_PLATFORM_PROFILE) 733 - else { 733 + } else { 734 734 platform_profile_cycle(); 735 735 return 1; 736 736 } 737 - #endif /* CONFIG_ACPI_PLATFORM_PROFILE */ 738 737 return 0; 739 738 case TP_X12_RAW_HOTKEY_FN_F10: 740 739 /* TAB1 has PICKUP Phone and TAB2 use Snipping tool*/