diff options
-rw-r--r-- | arch/ia64/hp/sim/simserial.c | 2 | ||||
-rw-r--r-- | drivers/tty/amiserial.c | 42 | ||||
-rw-r--r-- | include/linux/serialP.h | 8 |
3 files changed, 2 insertions, 50 deletions
diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c index 9890b58960a7..0d324e85379e 100644 --- a/arch/ia64/hp/sim/simserial.c +++ b/arch/ia64/hp/sim/simserial.c | |||
@@ -572,7 +572,6 @@ static void rs_close(struct tty_struct *tty, struct file * filp) | |||
572 | shutdown(info); | 572 | shutdown(info); |
573 | rs_flush_buffer(tty); | 573 | rs_flush_buffer(tty); |
574 | tty_ldisc_flush(tty); | 574 | tty_ldisc_flush(tty); |
575 | info->event = 0; | ||
576 | info->tty = NULL; | 575 | info->tty = NULL; |
577 | if (info->blocked_open) { | 576 | if (info->blocked_open) { |
578 | if (info->close_delay) | 577 | if (info->close_delay) |
@@ -610,7 +609,6 @@ static void rs_hangup(struct tty_struct *tty) | |||
610 | return; | 609 | return; |
611 | shutdown(info); | 610 | shutdown(info); |
612 | 611 | ||
613 | info->event = 0; | ||
614 | state->count = 0; | 612 | state->count = 0; |
615 | info->flags &= ~ASYNC_NORMAL_ACTIVE; | 613 | info->flags &= ~ASYNC_NORMAL_ACTIVE; |
616 | info->tty = NULL; | 614 | info->tty = NULL; |
diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c index c6d8913dd6f6..d5fac8626988 100644 --- a/drivers/tty/amiserial.c +++ b/drivers/tty/amiserial.c | |||
@@ -231,17 +231,6 @@ static void rs_start(struct tty_struct *tty) | |||
231 | * ----------------------------------------------------------------------- | 231 | * ----------------------------------------------------------------------- |
232 | */ | 232 | */ |
233 | 233 | ||
234 | /* | ||
235 | * This routine is used by the interrupt handler to schedule | ||
236 | * processing in the software interrupt portion of the driver. | ||
237 | */ | ||
238 | static void rs_sched_event(struct async_struct *info, | ||
239 | int event) | ||
240 | { | ||
241 | info->event |= 1 << event; | ||
242 | tasklet_schedule(&info->tlet); | ||
243 | } | ||
244 | |||
245 | static void receive_chars(struct async_struct *info) | 234 | static void receive_chars(struct async_struct *info) |
246 | { | 235 | { |
247 | int status; | 236 | int status; |
@@ -359,7 +348,7 @@ static void transmit_chars(struct async_struct *info) | |||
359 | if (CIRC_CNT(info->xmit.head, | 348 | if (CIRC_CNT(info->xmit.head, |
360 | info->xmit.tail, | 349 | info->xmit.tail, |
361 | SERIAL_XMIT_SIZE) < WAKEUP_CHARS) | 350 | SERIAL_XMIT_SIZE) < WAKEUP_CHARS) |
362 | rs_sched_event(info, RS_EVENT_WRITE_WAKEUP); | 351 | tty_wakeup(info->tty); |
363 | 352 | ||
364 | #ifdef SERIAL_DEBUG_INTR | 353 | #ifdef SERIAL_DEBUG_INTR |
365 | printk("THRE..."); | 354 | printk("THRE..."); |
@@ -427,7 +416,7 @@ static void check_modem_status(struct async_struct *info) | |||
427 | /* set a pending Tx Interrupt, transmitter should restart now */ | 416 | /* set a pending Tx Interrupt, transmitter should restart now */ |
428 | custom.intreq = IF_SETCLR | IF_TBE; | 417 | custom.intreq = IF_SETCLR | IF_TBE; |
429 | mb(); | 418 | mb(); |
430 | rs_sched_event(info, RS_EVENT_WRITE_WAKEUP); | 419 | tty_wakeup(info->tty); |
431 | return; | 420 | return; |
432 | } | 421 | } |
433 | } else { | 422 | } else { |
@@ -507,29 +496,6 @@ static irqreturn_t ser_tx_int(int irq, void *dev_id) | |||
507 | */ | 496 | */ |
508 | 497 | ||
509 | /* | 498 | /* |
510 | * This routine is used to handle the "bottom half" processing for the | ||
511 | * serial driver, known also the "software interrupt" processing. | ||
512 | * This processing is done at the kernel interrupt level, after the | ||
513 | * rs_interrupt() has returned, BUT WITH INTERRUPTS TURNED ON. This | ||
514 | * is where time-consuming activities which can not be done in the | ||
515 | * interrupt driver proper are done; the interrupt driver schedules | ||
516 | * them using rs_sched_event(), and they get done here. | ||
517 | */ | ||
518 | |||
519 | static void do_softint(unsigned long private_) | ||
520 | { | ||
521 | struct async_struct *info = (struct async_struct *) private_; | ||
522 | struct tty_struct *tty; | ||
523 | |||
524 | tty = info->tty; | ||
525 | if (!tty) | ||
526 | return; | ||
527 | |||
528 | if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event)) | ||
529 | tty_wakeup(tty); | ||
530 | } | ||
531 | |||
532 | /* | ||
533 | * --------------------------------------------------------------- | 499 | * --------------------------------------------------------------- |
534 | * Low level utility subroutines for the serial driver: routines to | 500 | * Low level utility subroutines for the serial driver: routines to |
535 | * figure out the appropriate timeout for an interrupt chain, routines | 501 | * figure out the appropriate timeout for an interrupt chain, routines |
@@ -1506,7 +1472,6 @@ static void rs_close(struct tty_struct *tty, struct file * filp) | |||
1506 | 1472 | ||
1507 | tty_ldisc_flush(tty); | 1473 | tty_ldisc_flush(tty); |
1508 | tty->closing = 0; | 1474 | tty->closing = 0; |
1509 | info->event = 0; | ||
1510 | info->tty = NULL; | 1475 | info->tty = NULL; |
1511 | if (info->blocked_open) { | 1476 | if (info->blocked_open) { |
1512 | if (info->close_delay) { | 1477 | if (info->close_delay) { |
@@ -1597,7 +1562,6 @@ static void rs_hangup(struct tty_struct *tty) | |||
1597 | 1562 | ||
1598 | rs_flush_buffer(tty); | 1563 | rs_flush_buffer(tty); |
1599 | shutdown(info); | 1564 | shutdown(info); |
1600 | info->event = 0; | ||
1601 | state->count = 0; | 1565 | state->count = 0; |
1602 | info->flags &= ~ASYNC_NORMAL_ACTIVE; | 1566 | info->flags &= ~ASYNC_NORMAL_ACTIVE; |
1603 | info->tty = NULL; | 1567 | info->tty = NULL; |
@@ -1744,7 +1708,6 @@ static int get_async_struct(int line, struct async_struct **ret_info) | |||
1744 | info->flags = sstate->flags; | 1708 | info->flags = sstate->flags; |
1745 | info->xmit_fifo_size = sstate->xmit_fifo_size; | 1709 | info->xmit_fifo_size = sstate->xmit_fifo_size; |
1746 | info->line = line; | 1710 | info->line = line; |
1747 | tasklet_init(&info->tlet, do_softint, (unsigned long)info); | ||
1748 | info->state = sstate; | 1711 | info->state = sstate; |
1749 | if (sstate->info) { | 1712 | if (sstate->info) { |
1750 | kfree(info); | 1713 | kfree(info); |
@@ -2050,7 +2013,6 @@ static int __exit amiga_serial_remove(struct platform_device *pdev) | |||
2050 | struct async_struct *info = state->info; | 2013 | struct async_struct *info = state->info; |
2051 | 2014 | ||
2052 | /* printk("Unloading %s: version %s\n", serial_name, serial_version); */ | 2015 | /* printk("Unloading %s: version %s\n", serial_name, serial_version); */ |
2053 | tasklet_kill(&info->tlet); | ||
2054 | if ((error = tty_unregister_driver(serial_driver))) | 2016 | if ((error = tty_unregister_driver(serial_driver))) |
2055 | printk("SERIAL: failed to unregister serial driver (%d)\n", | 2017 | printk("SERIAL: failed to unregister serial driver (%d)\n", |
2056 | error); | 2018 | error); |
diff --git a/include/linux/serialP.h b/include/linux/serialP.h index c1acdb2c8584..beaf39f819d6 100644 --- a/include/linux/serialP.h +++ b/include/linux/serialP.h | |||
@@ -56,11 +56,9 @@ struct async_struct { | |||
56 | unsigned short closing_wait; | 56 | unsigned short closing_wait; |
57 | int IER; /* Interrupt Enable Register */ | 57 | int IER; /* Interrupt Enable Register */ |
58 | int MCR; /* Modem control register */ | 58 | int MCR; /* Modem control register */ |
59 | unsigned long event; | ||
60 | int line; | 59 | int line; |
61 | int blocked_open; /* # of blocked opens */ | 60 | int blocked_open; /* # of blocked opens */ |
62 | struct circ_buf xmit; | 61 | struct circ_buf xmit; |
63 | struct tasklet_struct tlet; | ||
64 | wait_queue_head_t open_wait; | 62 | wait_queue_head_t open_wait; |
65 | wait_queue_head_t close_wait; | 63 | wait_queue_head_t close_wait; |
66 | wait_queue_head_t delta_msr_wait; | 64 | wait_queue_head_t delta_msr_wait; |
@@ -68,10 +66,4 @@ struct async_struct { | |||
68 | struct async_struct *prev_port; | 66 | struct async_struct *prev_port; |
69 | }; | 67 | }; |
70 | 68 | ||
71 | /* | ||
72 | * Events are used to schedule things to happen at timer-interrupt | ||
73 | * time, instead of at rs interrupt time. | ||
74 | */ | ||
75 | #define RS_EVENT_WRITE_WAKEUP 0 | ||
76 | |||
77 | #endif /* _LINUX_SERIAL_H */ | 69 | #endif /* _LINUX_SERIAL_H */ |