Skip to content

Commit 31d3bd5

Browse files
author
Tzung-Bi Shih
committed
platform/chrome: cros_kbd_led_backlight: Fix build dependencies
ccf395b ("platform/chrome: cros_ec_proto: Allow to build as module") allows CROS_EC_PROTO to be a module. The config is possible to be: - CONFIG_ACPI=y - CONFIG_CROS_EC=m - CONFIG_MFD_CROS_EC_DEV=m - CONFIG_CROS_EC_PROTO=m - CONFIG_CROS_KBD_LED_BACKLIGHT=y As a result: ld: vmlinux.o: in function `keyboard_led_set_brightness_ec_pwm': cros_kbd_led_backlight.c:(.text+0x3554e4c): undefined reference to `cros_ec_cmd_xfer_status' ld: vmlinux.o: in function `keyboard_led_get_brightness_ec_pwm': cros_kbd_led_backlight.c:(.text+0x3554f41): undefined reference to `cros_ec_cmd_xfer_status' The built-in code in CROS_KBD_LED_BACKLIGHT can't find symbols defined in the module CROS_EC_PROTO. Let A=ACPI (bool), M=MFD_CROS_EC_DEV (tristate), and K=CROS_KBD_LED_BACKLIGHT (tristate). The possible values are: | A | M | choice for K | ------------------------ | y | y | y/m/n | | y | m | m/n | | y | n | y/m/n | | n | y | y/m/n | | n | m | m/n | | n | n | n | Fix the dependencies in the Kconfig. Reported-by: Randy Dunlap <[email protected]> Closes: https://lore.kernel.org/chrome-platform/[email protected]/T/#u Fixes: ccf395b ("platform/chrome: cros_ec_proto: Allow to build as module") Tested-by: Randy Dunlap <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Tzung-Bi Shih <[email protected]>
1 parent 9aea0ed commit 31d3bd5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/platform/chrome/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@ config CROS_EC_PROTO
161161

162162
config CROS_KBD_LED_BACKLIGHT
163163
tristate "Backlight LED support for Chrome OS keyboards"
164-
depends on LEDS_CLASS && (ACPI || MFD_CROS_EC_DEV)
164+
depends on LEDS_CLASS
165+
depends on MFD_CROS_EC_DEV || (MFD_CROS_EC_DEV=n && ACPI)
165166
help
166167
This option enables support for the keyboard backlight LEDs on
167168
select Chrome OS systems.

0 commit comments

Comments
 (0)