diff mbox series

[v2] Input: applespi - Fix build error

Message ID 20190730133414.49008-1-yuehaibing@huawei.com (mailing list archive)
State Mainlined
Commit e77ff779a0c6666b697c56a6e41972bbf30b977f
Headers show
Series [v2] Input: applespi - Fix build error | expand

Commit Message

Yue Haibing July 30, 2019, 1:34 p.m. UTC
If CONFIG_KEYBOARD_APPLESPI=y but CONFIG_LEDS_CLASS=m
building fails:

drivers/input/keyboard/applespi.o: In function `applespi_probe':
applespi.c:(.text+0x1fcd): undefined reference to `devm_led_classdev_register_ext'

Add "depends on LEDS_CLASS" to the Konfig

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: 038b1a05eae6 ("Input: add Apple SPI keyboard and trackpad driver")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
v2: use 'depends on LEDS_CLASS'
---
 drivers/input/keyboard/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Dmitry Torokhov July 31, 2019, 1:49 p.m. UTC | #1
On Tue, Jul 30, 2019 at 09:34:14PM +0800, YueHaibing wrote:
> If CONFIG_KEYBOARD_APPLESPI=y but CONFIG_LEDS_CLASS=m
> building fails:
> 
> drivers/input/keyboard/applespi.o: In function `applespi_probe':
> applespi.c:(.text+0x1fcd): undefined reference to `devm_led_classdev_register_ext'
> 
> Add "depends on LEDS_CLASS" to the Konfig
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Fixes: 038b1a05eae6 ("Input: add Apple SPI keyboard and trackpad driver")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Applied, thank you.

> ---
> v2: use 'depends on LEDS_CLASS'
> ---
>  drivers/input/keyboard/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
> index ebb19e2..90e8a7f 100644
> --- a/drivers/input/keyboard/Kconfig
> +++ b/drivers/input/keyboard/Kconfig
> @@ -76,6 +76,7 @@ config KEYBOARD_APPLESPI
>  	depends on ACPI && EFI
>  	depends on SPI
>  	depends on X86 || COMPILE_TEST
> +	depends on LEDS_CLASS
>  	select CRC16
>  	help
>  	  Say Y here if you are running Linux on any Apple MacBook8,1 or later,
> -- 
> 2.7.4
> 
>
diff mbox series

Patch

diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
index ebb19e2..90e8a7f 100644
--- a/drivers/input/keyboard/Kconfig
+++ b/drivers/input/keyboard/Kconfig
@@ -76,6 +76,7 @@  config KEYBOARD_APPLESPI
 	depends on ACPI && EFI
 	depends on SPI
 	depends on X86 || COMPILE_TEST
+	depends on LEDS_CLASS
 	select CRC16
 	help
 	  Say Y here if you are running Linux on any Apple MacBook8,1 or later,