aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/rocket.c
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2007-02-12 03:52:31 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 12:48:30 -0500
commit40565f1962c5be9b9e285e05af01ab7771534868 (patch)
treeae84097778a8adfc5a9aad8a5428fe803d54346a /drivers/char/rocket.c
parentd096f3e9898d469493fc0afe88d7285c4bdc3ce2 (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.c10
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
109static void rp_do_poll(unsigned long dummy);
110
109static struct tty_driver *rocket_driver; 111static struct tty_driver *rocket_driver;
110 112
111static struct rocket_version driver_version = { 113static struct rocket_version driver_version = {
@@ -116,7 +118,7 @@ static struct r_port *rp_table[MAX_RP_PORTS]; /* The main repository of
116static unsigned int xmit_flags[NUM_BOARDS]; /* Bit significant, indicates port had data to transmit. */ 118static 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, ... */
118static atomic_t rp_num_ports_open; /* Number of serial ports open */ 120static atomic_t rp_num_ports_open; /* Number of serial ports open */
119static struct timer_list rocket_timer; 121static DEFINE_TIMER(rocket_timer, rp_do_poll, 0, 0);
120 122
121static unsigned long board1; /* ISA addresses, retrieved from rocketport.conf */ 123static unsigned long board1; /* ISA addresses, retrieved from rocketport.conf */
122static unsigned long board2; 124static 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 */