sony-laptop/thinkpad-acpi: fix build error
Subsystems (3)
PATCH 1/1 sony-laptop/thinkpad-acpi: fix build error
sony-laptop and thinkpad-acpi make use of input-core functions. Hence you get link errors if those drivers are built but CONFIG_INPUT is not set. Attached patch fixes this minor issue.
Regards,
Andreas
--
Build errors if CONFIG_SONY_LAPTOP && !INPUT or
if CONFIG_THINKPAD_ACPI && !INPUT:
LD vmlinux
...
drivers/built-in.o: In function `sony_laptop_remove_input':
sony-laptop.c:(.text+0x768fb): undefined reference to `input_unregister_device'
...
drivers/built-in.o: In function `thinkpad_acpi_module_exit':
thinkpad_acpi.c:(.text+0x78c1b): undefined reference to `input_free_device'
...I suggest to auto-select CONFIG_INPUT for both drivers.
--- drivers/misc/Kconfig | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/misc/Kconfig +2 -0
@@ -134,6 +134,7 @@ config SONY_LAPTOP tristate "Sony Laptop Extras" depends on X86 && ACPI select BACKLIGHT_CLASS_DEVICE + select INPUT ---help--- This mini-driver drives the SNC and SPIC devices present in the ACPI BIOS of the Sony Vaio laptops.
@@ -156,6 +157,7 @@ config THINKPAD_ACPI select BACKLIGHT_CLASS_DEVICE select HWMON select NVRAM + select INPUT ---help--- This is a driver for the IBM and Lenovo ThinkPad laptops. It adds support for Fn-Fx key combinations, Bluetooth control, video
Signature · 1 line
1.5.3
Quoted 3 lines · Andreas Herrmann
sony-laptop and thinkpad-acpi make use of input-core functions. Hence you get link errors if those drivers are built but
CONFIG_INPUTis not set. Attached patch fixes this minor issue.
[...]
drivers/misc/Kconfig config THINKPAD_ACPI · line 163
Quoted 8 lines
drivers/misc/Kconfig +1
-0@@ -156,6 +157,7 @@ config THINKPAD_ACPI select BACKLIGHT_CLASS_DEVICE select HWMON select NVRAM + select INPUT ---help--- This is a driver for the IBM and Lenovo ThinkPad laptops. It adds support for Fn-Fx key combinations, Bluetooth control, video
Signature · 4 lines
"One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh
Quoted 3 lines · Andreas Herrmann
sony-laptop and thinkpad-acpi make use of input-core functions. Hence you get link errors if those drivers are built but
CONFIG_INPUTis not set. Attached patch fixes this minor issue.
...
Quoted 10 lines
Signed-off-by Andreas Herrmann <[email protected]>--- drivers/misc/Kconfig | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)drivers/misc/Kconfig +0
-0
drivers/misc/Kconfig config SONY_LAPTOP · line 140
Quoted 7 lines
drivers/misc/Kconfig +1
-0@@ -134,6 +134,7 @@ config SONY_LAPTOP tristate "Sony Laptop Extras" depends on X86 && ACPI select BACKLIGHT_CLASS_DEVICE + select INPUT ---help--- This mini-driver drives the SNC and SPIC devices present in the ACPI BIOS of the Sony Vaio laptops.
Thanks
Signature · 2 lines
mattia :wq!
Len Brown
reviewerQuoted 22 lines · Andreas Herrmann
sony-laptop and thinkpad-acpi make use of input-core functions. Hence you get link errors if those drivers are built but
CONFIG_INPUTis not set. Attached patch fixes this minor issue.Regards,
Andreas
--
Build errors ifCONFIG_SONY_LAPTOP&& !INPUT or
ifCONFIG_THINKPAD_ACPI&& !INPUT:LD vmlinux
... drivers/built-in.o: In function `sony_laptop_remove_input': sony-laptop.c:(.text+0x768fb): undefined reference to `input_unregister_device' ... drivers/built-in.o: In function `thinkpad_acpi_module_exit': thinkpad_acpi.c:(.text+0x78c1b): undefined reference to `input_free_device' ...
Quoted 1 line
I suggest to auto-select
CONFIG_INPUTfor both drivers.
I'd prefer to use "depends on" here, as "select" is sort of a last resort, given its inherent disfunctionalty (is that a word?:-)
yes, I wish "select" worked the way programmers want it to, but it doesn't. Indeed, the only reason using it here is technically correct is that both these invocations depends on X86 and that avoids the conflict with !s390 INPUT.
Also, the reality is that all configs that want these drivers will have INPUT set already -- something that probably could not be said of BACKLIGHT_CLASS_DEVICE etc. -- so this patch is really just to please randconfig.
Unless you object, I'll just change this to "depends on" when i apply it.
thanks,
-Len
Quoted 25 lines
Signed-off-by Andreas Herrmann <[email protected]>--- drivers/misc/Kconfig | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)drivers/misc/Kconfig +2
-0@@ -134,6 +134,7 @@ config SONY_LAPTOP tristate "Sony Laptop Extras" depends on X86 && ACPI select BACKLIGHT_CLASS_DEVICE + select INPUT ---help--- This mini-driver drives the SNC and SPIC devices present in the ACPI BIOS of the Sony Vaio laptops.@@ -156,6 +157,7 @@ config THINKPAD_ACPI select BACKLIGHT_CLASS_DEVICE select HWMON select NVRAM + select INPUT ---help--- This is a driver for the IBM and Lenovo ThinkPad laptops. It adds support for Fn-Fx key combinations, Bluetooth control, video
Quoted 1 line · Len Brown
Unless you object, I'll just change this to "depends on" when i apply it.
IMHO either is fine, so consider this an Ack for either select or depend for what concerns thinkpad-acpi.
Signature · 4 lines
"One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh
Quoted 4 lines · Len Brown
I'd prefer to use "depends on" here, as "select" is sort of a last resort, given its inherent disfunctionalty (is that a word?:-)
Yes, select is evil as it does not take care of "select" and "depends on" statements of the selected config option.
Quoted 4 lines
yes, I wish "select" worked the way programmers want it to, but it doesn't. Indeed, the only reason using it here is technically correct is that both these invocations depends on X86 and that avoids the conflict with !s390 INPUT.
Hmm, wasn't especially aware of that.
Quoted 4 lines
Also, the reality is that all configs that want these drivers will have INPUT set already -- something that probably could not be said of
BACKLIGHT_CLASS_DEVICEetc. -- so this patch is really just to please randconfig.
Right you are. Randconfig found that one.
Quoted 1 line
Unless you object, I'll just change this to "depends on" when i apply it.
No, I don't object.
Regards,
Andreas
Quoted 4 lines · Len Brown
Quoted 3 lines · Andreas Herrmann
sony-laptop and thinkpad-acpi make use of input-core functions. Hence you get link errors if those drivers are built but
CONFIG_INPUTis not set. Attached patch fixes this minor issue.
...
Quoted 1 line
Unless you object, I'll just change this to "depends on" when i apply it.
that is fine to me
cheers
Signature · 2 lines
mattia :wq!