diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2007-02-12 03:52:31 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-12 12:48:30 -0500 |
commit | 40565f1962c5be9b9e285e05af01ab7771534868 (patch) | |
tree | ae84097778a8adfc5a9aad8a5428fe803d54346a /drivers/char/rocket.c | |
parent | d096f3e9898d469493fc0afe88d7285c4bdc3ce2 (diff) |
[PATCH] Char: timers cleanup
- Use timer macros to set function and data members and to modify
expiration time.
- Use DEFINE_TIMER for global timers and do not init them at run-time in
these cases.
- del_timer_sync is common in most cases -- we want to wait for timer
function if it's still running.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Dave Airlie <airlied@linux.ie>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Paul Fulghum <paulkf@microgate.com>
Cc: Kylene Jo Hall <kjhall@us.ibm.com>
Cc: Wim Van Sebroeck <wim@iguana.be>
Acked-by: Dmitry Torokhov <dtor@mail.ru> (Input bits)
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/rocket.c')
-rw-r--r-- | drivers/char/rocket.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c index 106f225e745f..76357c855ce3 100644 --- a/drivers/char/rocket.c +++ b/drivers/char/rocket.c | |||
@@ -106,6 +106,8 @@ | |||
106 | 106 | ||
107 | /****** RocketPort Local Variables ******/ | 107 | /****** RocketPort Local Variables ******/ |
108 | 108 | ||
109 | static void rp_do_poll(unsigned long dummy); | ||
110 | |||
109 | static struct tty_driver *rocket_driver; | 111 | static struct tty_driver *rocket_driver; |
110 | 112 | ||
111 | static struct rocket_version driver_version = { | 113 | static struct rocket_version driver_version = { |
@@ -116,7 +118,7 @@ static struct r_port *rp_table[MAX_RP_PORTS]; /* The main repository of | |||
116 | static unsigned int xmit_flags[NUM_BOARDS]; /* Bit significant, indicates port had data to transmit. */ | 118 | static unsigned int xmit_flags[NUM_BOARDS]; /* Bit significant, indicates port had data to transmit. */ |
117 | /* eg. Bit 0 indicates port 0 has xmit data, ... */ | 119 | /* eg. Bit 0 indicates port 0 has xmit data, ... */ |
118 | static atomic_t rp_num_ports_open; /* Number of serial ports open */ | 120 | static atomic_t rp_num_ports_open; /* Number of serial ports open */ |
119 | static struct timer_list rocket_timer; | 121 | static DEFINE_TIMER(rocket_timer, rp_do_poll, 0, 0); |
120 | 122 | ||
121 | static unsigned long board1; /* ISA addresses, retrieved from rocketport.conf */ | 123 | static unsigned long board1; /* ISA addresses, retrieved from rocketport.conf */ |
122 | static unsigned long board2; | 124 | static unsigned long board2; |
@@ -2368,12 +2370,6 @@ static int __init rp_init(void) | |||
2368 | return -ENOMEM; | 2370 | return -ENOMEM; |
2369 | 2371 | ||
2370 | /* | 2372 | /* |
2371 | * Set up the timer channel. | ||
2372 | */ | ||
2373 | init_timer(&rocket_timer); | ||
2374 | rocket_timer.function = rp_do_poll; | ||
2375 | |||
2376 | /* | ||
2377 | * Initialize the array of pointers to our own internal state | 2373 | * Initialize the array of pointers to our own internal state |
2378 | * structures. | 2374 | * structures. |
2379 | */ | 2375 | */ |