mirror of
https://xff.cz/git/u-boot/
synced 2025-08-31 16:22:36 +02:00
stdio: Remove redundant code around stdio_register() calls
There is no point in setting a structure's memory to NULL when it has already been zeroed with memset(). Also, there is no need to create a stub function for stdio to call - if the function is NULL it will not be called. This is a clean-up, with no change in functionality. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Marek Vasut <marex@denx.de>
This commit is contained in:
@@ -522,8 +522,6 @@ int drv_usb_kbd_init(void)
|
||||
memset(&usb_kbd_dev, 0, sizeof(struct stdio_dev));
|
||||
strcpy(usb_kbd_dev.name, DEVNAME);
|
||||
usb_kbd_dev.flags = DEV_FLAGS_INPUT | DEV_FLAGS_SYSTEM;
|
||||
usb_kbd_dev.putc = NULL;
|
||||
usb_kbd_dev.puts = NULL;
|
||||
usb_kbd_dev.getc = usb_kbd_getc;
|
||||
usb_kbd_dev.tstc = usb_kbd_testc;
|
||||
usb_kbd_dev.priv = (void *)dev;
|
||||
|
Reference in New Issue
Block a user