diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2006-12-08 05:38:17 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-08 11:28:53 -0500 |
commit | 06cc86b5bd4edcf5e7d68624f7d5c9951916f3d1 (patch) | |
tree | 3e6069bdfc681ca2e240c71129a0b56c933831f3 /drivers | |
parent | 7a7a5c3303a66c9000f270d6dd03ddeda8c80768 (diff) |
[PATCH] Char: mxser_new, kill unneeded memsets
mxser_new, kill unneeded memsets
There is no need to re-zero static global variables' memory, hence memsets
doing this are useless. alloc_tty_struct also zeroes allocated memory:
another candidate for removing.
This fixes also a bug -- global structures are cleaned up after
initialization of some its parts.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/mxser_new.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/char/mxser_new.c b/drivers/char/mxser_new.c index 5a4c80d38c65..4ca97c4401d5 100644 --- a/drivers/char/mxser_new.c +++ b/drivers/char/mxser_new.c | |||
@@ -704,7 +704,6 @@ static int __init mxser_init(void) | |||
704 | MXSER_VERSION); | 704 | MXSER_VERSION); |
705 | 705 | ||
706 | /* Initialize the tty_driver structure */ | 706 | /* Initialize the tty_driver structure */ |
707 | memset(mxvar_sdriver, 0, sizeof(struct tty_driver)); | ||
708 | mxvar_sdriver->magic = TTY_DRIVER_MAGIC; | 707 | mxvar_sdriver->magic = TTY_DRIVER_MAGIC; |
709 | mxvar_sdriver->name = "ttyM"; | 708 | mxvar_sdriver->name = "ttyM"; |
710 | mxvar_sdriver->major = ttymajor; | 709 | mxvar_sdriver->major = ttymajor; |
@@ -721,12 +720,6 @@ static int __init mxser_init(void) | |||
721 | mxvar_sdriver->termios_locked = mxvar_termios_locked; | 720 | mxvar_sdriver->termios_locked = mxvar_termios_locked; |
722 | 721 | ||
723 | mxvar_diagflag = 0; | 722 | mxvar_diagflag = 0; |
724 | memset(mxser_boards, 0, sizeof(mxser_boards)); | ||
725 | memset(&mxvar_log, 0, sizeof(struct mxser_log)); | ||
726 | |||
727 | memset(&mxser_msr, 0, sizeof(unsigned char) * (MXSER_PORTS + 1)); | ||
728 | memset(&mon_data_ext, 0, sizeof(struct mxser_mon_ext)); | ||
729 | memset(&mxser_set_baud_method, 0, sizeof(int) * (MXSER_PORTS + 1)); | ||
730 | 723 | ||
731 | m = 0; | 724 | m = 0; |
732 | /* Start finding ISA boards here */ | 725 | /* Start finding ISA boards here */ |