summaryrefslogtreecommitdiff
path: root/common/usb_kbd.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2014-09-20 16:54:36 +0200
committerMarek Vasut <marex@denx.de>2014-10-06 14:50:43 +0200
commit3f78a28037c65b92d2717b7787902a853c2506a4 (patch)
tree0a63b58a67fe90dab3f95b6f2155c70921573867 /common/usb_kbd.c
parent6e78c74f62ebfa378d1a2f9b83423b23545c28bf (diff)
downloadu-boot-imx-3f78a28037c65b92d2717b7787902a853c2506a4.zip
u-boot-imx-3f78a28037c65b92d2717b7787902a853c2506a4.tar.gz
u-boot-imx-3f78a28037c65b92d2717b7787902a853c2506a4.tar.bz2
usb: kbd: Remove check for already being registered
We now always properly deregister the keyboard before calling drv_usb_kbd_init(), so we can drop the check for already being registered. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'common/usb_kbd.c')
-rw-r--r--common/usb_kbd.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/common/usb_kbd.c b/common/usb_kbd.c
index 4c17b0d..d4d5f48 100644
--- a/common/usb_kbd.c
+++ b/common/usb_kbd.c
@@ -490,7 +490,7 @@ static int usb_kbd_probe(struct usb_device *dev, unsigned int ifnum)
/* Search for keyboard and register it if found. */
int drv_usb_kbd_init(void)
{
- struct stdio_dev usb_kbd_dev, *old_dev;
+ struct stdio_dev usb_kbd_dev;
struct usb_device *dev;
char *stdinname = getenv("stdin");
int error, i;
@@ -509,16 +509,6 @@ int drv_usb_kbd_init(void)
if (usb_kbd_probe(dev, 0) != 1)
continue;
- /* We found a keyboard, check if it is already registered. */
- debug("USB KBD: found set up device.\n");
- old_dev = stdio_get_by_name(DEVNAME);
- if (old_dev) {
- /* Already registered, just return ok. */
- debug("USB KBD: is already registered.\n");
- usb_kbd_deregister();
- return 1;
- }
-
/* Register the keyboard */
debug("USB KBD: register.\n");
memset(&usb_kbd_dev, 0, sizeof(struct stdio_dev));