]> git.sur5r.net Git - u-boot/commitdiff
drivers/input: Move conditional compilation to Makefile
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Tue, 12 Aug 2008 23:40:40 +0000 (01:40 +0200)
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Tue, 12 Aug 2008 23:40:40 +0000 (01:40 +0200)
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
drivers/input/Makefile
drivers/input/i8042.c
drivers/input/keyboard.c
drivers/input/pc_keyb.c
drivers/input/ps2mult.c
drivers/input/ps2ser.c

index 2933cb6451daaa3655e042c02d4926daddedb656..9a144073999d71ef9b6a16bc9dc969c6bdef27f8 100644 (file)
@@ -25,9 +25,11 @@ include $(TOPDIR)/config.mk
 
 LIB    := $(obj)libinput.a
 
-COBJS-y += i8042.o
-COBJS-y += keyboard.o
-COBJS-y += pc_keyb.o ps2ser.o ps2mult.o
+COBJS-$(CONFIG_I8042_KBD) += i8042.o
+ifdef CONFIG_PS2KBD
+COBJS-y += keyboard.o pc_keyb.o
+COBJS-$(CONFIG_PS2MULT) += ps2mult.o ps2ser.o
+endif
 
 COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
index 22c2a4e3a02da185783e0a1064ceca2f54f0866d..d152768b8e09428c4926fc7f7f6fa5a3670e8d8c 100644 (file)
@@ -27,8 +27,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_I8042_KBD
-
 #ifdef CONFIG_USE_CPCIDVI
 extern u8  gt_cpcidvi_in8(u32 offset);
 extern void gt_cpcidvi_out8(u32 offset, u8 data);
@@ -670,5 +668,3 @@ static int kbd_reset (void)
 
     return 0;
 }
-
-#endif /* CONFIG_I8042_KBD */
index 54182a79b1d320ef20b6443ebbe7a06dde803add..a634d76d6c294e7dfd50929f63e2101da0ebf17e 100644 (file)
@@ -11,8 +11,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_PS2KBD
-
 #include <devices.h>
 #include <keyboard.h>
 
@@ -301,5 +299,3 @@ int kbd_init (void)
        }
        return error;
 }
-
-#endif /* CONFIG_PS2KBD */
index 33e7c5f1248ef428a0763503761ab768a4f26c49..25ad3e40650449cfd15928d90da187d1fc4e6dd0 100644 (file)
@@ -13,8 +13,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_PS2KBD
-
 #include <keyboard.h>
 #include <pc_keyb.h>
 
@@ -252,5 +250,3 @@ void pckbd_leds(unsigned char leds)
        kbd_send_data(KBD_CMD_SET_LEDS);
        kbd_send_data(leds);
 }
-
-#endif /* CONFIG_PS2KBD */
index 9515a0fbf544e67ab52c33242c3861ea39d1667b..ecd585323f92107ea32470d4df3c511447f02ee0 100644 (file)
@@ -16,8 +16,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_PS2MULT
-
 #include <pc_keyb.h>
 #include <asm/atomic.h>
 #include <ps2mult.h>
@@ -462,5 +460,3 @@ int ps2mult_request_irq(void (*handler)(void *))
 
        return 0;
 }
-
-#endif /* CONFIG_PS2MULT */
index c1741eac67d425fe7a1e18809e06f840581616fb..480ffa25a2bfecb05d14df6fb4a8ebbca89226ab 100644 (file)
@@ -15,8 +15,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_PS2SERIAL
-
 #include <asm/io.h>
 #include <asm/atomic.h>
 #include <ps2mult.h>
@@ -326,5 +324,3 @@ static void ps2ser_interrupt(void *dev_id)
                ps2mult_callback(atomic_read(&ps2buf_cnt));
        }
 }
-
-#endif /* CONFIG_PS2SERIAL */