]> git.sur5r.net Git - u-boot/commitdiff
usb_kbd: fix usb_kbd_deregister when DEVICE_DEREGISTER not enable
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Tue, 2 Dec 2008 20:58:04 +0000 (21:58 +0100)
committerRemy Bohmer <linux@bohmer.net>
Sat, 20 Dec 2008 10:03:01 +0000 (11:03 +0100)
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Remy Böhmer <linux@bohmer.net>
common/usb_kbd.c
include/devices.h

index cf14560955765c6f65701ec68c42d5954a2ac0d9..89e6ee7e5d103a20bfe2132c0869e1fae2d9fbc6 100644 (file)
@@ -211,7 +211,11 @@ int drv_usb_kbd_init(void)
 /* deregistering the keyboard */
 int usb_kbd_deregister(void)
 {
+#ifdef CONFIG_SYS_DEVICE_DEREGISTER
        return device_deregister(DEVNAME);
+#else
+       return 1;
+#endif
 }
 
 /**************************************************************************
index 6b78d5888942faccf2c511fbd6724bcb60e9df27..20ddfc43427b205adc8865744ab69ed4826f458b 100644 (file)
@@ -91,7 +91,9 @@ extern char *stdio_names[MAX_FILES];
  */
 int    device_register (device_t * dev);
 int    devices_init (void);
+#ifdef CONFIG_SYS_DEVICE_DEREGISTER
 int    device_deregister(char *devname);
+#endif
 struct list_head* device_get_list(void);
 device_t* device_get_by_name(char* name);
 device_t* device_clone(device_t *dev);