From 91d0be1dd845913ba276e041dc11d1297390de11 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 23 Jul 2014 06:54:58 -0600 Subject: 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 Acked-by: Marek Vasut --- drivers/input/keyboard.c | 2 -- drivers/video/cfb_console.c | 2 -- 2 files changed, 4 deletions(-) (limited to 'drivers') diff --git a/drivers/input/keyboard.c b/drivers/input/keyboard.c index 614592e..5ef1cc0 100644 --- a/drivers/input/keyboard.c +++ b/drivers/input/keyboard.c @@ -275,8 +275,6 @@ int kbd_init (void) memset (&kbddev, 0, sizeof(kbddev)); strcpy(kbddev.name, DEVNAME); kbddev.flags = DEV_FLAGS_INPUT | DEV_FLAGS_SYSTEM; - kbddev.putc = NULL ; - kbddev.puts = NULL ; kbddev.getc = kbd_getc ; kbddev.tstc = kbd_testc ; diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index b52e9ed..1cf8660 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -2279,8 +2279,6 @@ int drv_video_init(void) console_dev.flags = DEV_FLAGS_OUTPUT | DEV_FLAGS_SYSTEM; console_dev.putc = video_putc; /* 'putc' function */ console_dev.puts = video_puts; /* 'puts' function */ - console_dev.tstc = NULL; /* 'tstc' function */ - console_dev.getc = NULL; /* 'getc' function */ #if !defined(CONFIG_VGA_AS_SINGLE_DEVICE) /* Also init console device */ -- cgit v1.1