]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
input-route-kbd-leds-through-the-generic-leds-layer-fix-3
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Tue, 5 Nov 2013 05:54:58 +0000 (16:54 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 5 Nov 2013 05:54:58 +0000 (16:54 +1100)
Link input/leds.c along input/input.c instead of separate module

input.c needs to call leds.c and vice-versa, so it is simpler to stuff
them together. INPUT_LEDS thus now depends on LEDS_CLASS being available
enough for input.ko.

This also documents the new leds field.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/input/Kconfig
drivers/input/Makefile
include/linux/input.h

index a6edec38242392d17fe6f6ef50a49c12dfa63201..f77b406eac5f6d5fc11ef4e2a6c002b610283b45 100644 (file)
@@ -179,8 +179,8 @@ comment "Input Device Drivers"
 source "drivers/input/keyboard/Kconfig"
 
 config INPUT_LEDS
-       tristate "LED Support"
-       depends on LEDS_CLASS
+       bool "LED Support"
+       depends on LEDS_CLASS = INPUT || LEDS_CLASS = y
        select LEDS_TRIGGERS
        default y
        help
index 9d6e9e20b1566d3e133982b15fca7c6e960f6aa4..2ab5f3336da5c9e603601c632d5bd6b182405161 100644 (file)
@@ -6,6 +6,9 @@
 
 obj-$(CONFIG_INPUT)            += input-core.o
 input-core-y := input.o input-compat.o input-mt.o ff-core.o
+ifeq ($(CONFIG_INPUT_LEDS),y)
+input-core-y += leds.o
+endif
 
 obj-$(CONFIG_INPUT_FF_MEMLESS) += ff-memless.o
 obj-$(CONFIG_INPUT_POLLDEV)    += input-polldev.o
@@ -16,7 +19,6 @@ obj-$(CONFIG_INPUT_MOUSEDEV)  += mousedev.o
 obj-$(CONFIG_INPUT_JOYDEV)     += joydev.o
 obj-$(CONFIG_INPUT_EVDEV)      += evdev.o
 obj-$(CONFIG_INPUT_EVBUG)      += evbug.o
-obj-$(CONFIG_INPUT_LEDS)       += leds.o
 
 obj-$(CONFIG_INPUT_KEYBOARD)   += keyboard/
 obj-$(CONFIG_INPUT_MOUSE)      += mouse/
index 18a066f257785ce8b66334807b94e921b8538c13..6453b22372ac4cab8396719335ffe7a5a1e0a5e8 100644 (file)
@@ -79,6 +79,7 @@ struct input_value {
  * @led: reflects current state of device's LEDs
  * @snd: reflects current state of sound effects
  * @sw: reflects current state of device's switches
+ * @leds: leds objects for the device's LEDs
  * @open: this method is called when the very first user calls
  *     input_open_device(). The driver must prepare the device
  *     to start generating events (start polling thread,