[PATCH] input: Compile keymap only if necessary

Alexander Shiyan shc_work at mail.ru
Sun Jun 19 10:53:33 PDT 2016


Signed-off-by: Alexander Shiyan <shc_work at mail.ru>
---
 drivers/input/Makefile   | 3 +--
 include/input/keyboard.h | 4 ++++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/input/Makefile b/drivers/input/Makefile
index 7d2c194..e694a98 100644
--- a/drivers/input/Makefile
+++ b/drivers/input/Makefile
@@ -1,8 +1,7 @@
-obj-$(CONFIG_INPUT) += input.o
+obj-$(CONFIG_INPUT) += input.o keymap.o
 obj-$(CONFIG_INPUT_MATRIXKMAP) += matrix-keymap.o
 obj-$(CONFIG_KEYBOARD_USB) += usb_kbd.o
 obj-$(CONFIG_KEYBOARD_GPIO) += gpio_keys.o
 obj-$(CONFIG_KEYBOARD_TWL6030) += twl6030_pwrbtn.o
 obj-$(CONFIG_KEYBOARD_IMX_KEYPAD) += imx_keypad.o
 obj-$(CONFIG_KEYBOARD_QT1070) += qt1070.o
-obj-y += keymap.o
diff --git a/include/input/keyboard.h b/include/input/keyboard.h
index d1f5bf5..e205a51 100644
--- a/include/input/keyboard.h
+++ b/include/input/keyboard.h
@@ -1,6 +1,8 @@
 #ifndef __INPUT_KEYBOARD_H
 #define __INPUT_KEYBOARD_H
 
+#ifdef CONFIG_INPUT
+
 #include <linux/types.h>
 
 #define NR_KEYS	256
@@ -9,3 +11,5 @@ extern uint8_t keycode_bb_keys[NR_KEYS];
 extern uint8_t keycode_bb_shift_keys[NR_KEYS];
 
 #endif
+
+#endif
-- 
2.4.9




More information about the barebox mailing list