Commit fea91edee8ae0295e3c30b1ff544df51f4d668e1
Committed by
Remy Bohmer
1 parent
aced78d852
Exists in
master
and in
54 other branches
usb_kbd: fix usb_kbd_deregister when DEVICE_DEREGISTER not enable
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Remy Böhmer <linux@bohmer.net>
Showing 2 changed files with 6 additions and 0 deletions Side-by-side Diff
common/usb_kbd.c
... | ... | @@ -211,7 +211,11 @@ |
211 | 211 | /* deregistering the keyboard */ |
212 | 212 | int usb_kbd_deregister(void) |
213 | 213 | { |
214 | +#ifdef CONFIG_SYS_DEVICE_DEREGISTER | |
214 | 215 | return device_deregister(DEVNAME); |
216 | +#else | |
217 | + return 1; | |
218 | +#endif | |
215 | 219 | } |
216 | 220 | |
217 | 221 | /************************************************************************** |
include/devices.h
... | ... | @@ -91,7 +91,9 @@ |
91 | 91 | */ |
92 | 92 | int device_register (device_t * dev); |
93 | 93 | int devices_init (void); |
94 | +#ifdef CONFIG_SYS_DEVICE_DEREGISTER | |
94 | 95 | int device_deregister(char *devname); |
96 | +#endif | |
95 | 97 | struct list_head* device_get_list(void); |
96 | 98 | device_t* device_get_by_name(char* name); |
97 | 99 | device_t* device_clone(device_t *dev); |