diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2007-05-08 03:36:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 14:15:25 -0400 |
commit | 3991428d9efc7185312196f82cc36e9df4a2ddb0 (patch) | |
tree | d7a8d28f218f3063c737c570c7539cccd265b144 /drivers/char | |
parent | ce71b0ffd01b0917a74c03562aaa110a71a0ee29 (diff) |
Char: cyclades, timers cleanup
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/cyclades.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c index 91609539ad8a..14652c1ed024 100644 --- a/drivers/char/cyclades.c +++ b/drivers/char/cyclades.c | |||
@@ -932,15 +932,9 @@ do_softint(struct work_struct *work) | |||
932 | if (test_and_clear_bit(Cy_EVENT_OPEN_WAKEUP, &info->event)) | 932 | if (test_and_clear_bit(Cy_EVENT_OPEN_WAKEUP, &info->event)) |
933 | wake_up_interruptible(&info->open_wait); | 933 | wake_up_interruptible(&info->open_wait); |
934 | #ifdef CONFIG_CYZ_INTR | 934 | #ifdef CONFIG_CYZ_INTR |
935 | if (test_and_clear_bit(Cy_EVENT_Z_RX_FULL, &info->event)) { | 935 | if (test_and_clear_bit(Cy_EVENT_Z_RX_FULL, &info->event) && |
936 | if (cyz_rx_full_timer[info->line].function == NULL) { | 936 | !timer_pending(&cyz_rx_full_timer[info->line])) |
937 | cyz_rx_full_timer[info->line].expires = jiffies + 1; | 937 | mod_timer(&cyz_rx_full_timer[info->line], jiffies + 1); |
938 | cyz_rx_full_timer[info->line].function = cyz_rx_restart; | ||
939 | cyz_rx_full_timer[info->line].data = | ||
940 | (unsigned long)info; | ||
941 | add_timer(&cyz_rx_full_timer[info->line]); | ||
942 | } | ||
943 | } | ||
944 | #endif | 938 | #endif |
945 | if (test_and_clear_bit(Cy_EVENT_DELTA_WAKEUP, &info->event)) | 939 | if (test_and_clear_bit(Cy_EVENT_DELTA_WAKEUP, &info->event)) |
946 | wake_up_interruptible(&info->delta_msr_wait); | 940 | wake_up_interruptible(&info->delta_msr_wait); |
@@ -1887,7 +1881,6 @@ static void cyz_rx_restart(unsigned long arg) | |||
1887 | printk(KERN_ERR "cyc:cyz_rx_restart retval on ttyC%d was %x\n", | 1881 | printk(KERN_ERR "cyc:cyz_rx_restart retval on ttyC%d was %x\n", |
1888 | info->line, retval); | 1882 | info->line, retval); |
1889 | } | 1883 | } |
1890 | cyz_rx_full_timer[info->line].function = NULL; | ||
1891 | CY_UNLOCK(info, flags); | 1884 | CY_UNLOCK(info, flags); |
1892 | } | 1885 | } |
1893 | 1886 | ||
@@ -4529,8 +4522,8 @@ static void __devinit cy_init_card(struct cyclades_card *cinfo) | |||
4529 | else | 4522 | else |
4530 | info->xmit_fifo_size = 4 * CYZ_FIFO_SIZE; | 4523 | info->xmit_fifo_size = 4 * CYZ_FIFO_SIZE; |
4531 | #ifdef CONFIG_CYZ_INTR | 4524 | #ifdef CONFIG_CYZ_INTR |
4532 | init_timer(&cyz_rx_full_timer[port]); | 4525 | setup_timer(&cyz_rx_full_timer[port], |
4533 | cyz_rx_full_timer[port].function = NULL; | 4526 | cyz_rx_restart, (unsigned long)info); |
4534 | #endif | 4527 | #endif |
4535 | } else { | 4528 | } else { |
4536 | info->type = PORT_CIRRUS; | 4529 | info->type = PORT_CIRRUS; |