diff options
author | Jeff Dike <jdike@addtoit.com> | 2006-01-06 03:18:54 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-06 11:33:46 -0500 |
commit | 9010772cdff36072dd509ec72c1a55fccde8e58e (patch) | |
tree | b87fbf28462462b691b6f2bca382dd6188ef3dc1 /arch/um/drivers/line.c | |
parent | d571cd18f225542460b5d9b83e5e0d507be71656 (diff) |
[PATCH] uml: Add static initializations and declarations
Some structure fields were being dynamically initialized when they could be
initialized at compile-time instead. This also makes some declarations static
(in the C sense).
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/drivers/line.c')
-rw-r--r-- | arch/um/drivers/line.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c index 9af55ece198d..1c2cc5d48bbb 100644 --- a/arch/um/drivers/line.c +++ b/arch/um/drivers/line.c | |||
@@ -668,19 +668,18 @@ struct tty_driver *line_register_devfs(struct lines *set, | |||
668 | return driver; | 668 | return driver; |
669 | } | 669 | } |
670 | 670 | ||
671 | static spinlock_t winch_handler_lock; | 671 | static DEFINE_SPINLOCK(winch_handler_lock); |
672 | LIST_HEAD(winch_handlers); | 672 | static LIST_HEAD(winch_handlers); |
673 | 673 | ||
674 | void lines_init(struct line *lines, int nlines) | 674 | void lines_init(struct line *lines, int nlines) |
675 | { | 675 | { |
676 | struct line *line; | 676 | struct line *line; |
677 | int i; | 677 | int i; |
678 | 678 | ||
679 | spin_lock_init(&winch_handler_lock); | ||
680 | for(i = 0; i < nlines; i++){ | 679 | for(i = 0; i < nlines; i++){ |
681 | line = &lines[i]; | 680 | line = &lines[i]; |
682 | INIT_LIST_HEAD(&line->chan_list); | 681 | INIT_LIST_HEAD(&line->chan_list); |
683 | spin_lock_init(&line->lock); | 682 | |
684 | if(line->init_str == NULL) | 683 | if(line->init_str == NULL) |
685 | continue; | 684 | continue; |
686 | 685 | ||