aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/tty/amiserial.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c
index 5540216e64fd..7607c6ebd39a 100644
--- a/drivers/tty/amiserial.c
+++ b/drivers/tty/amiserial.c
@@ -100,8 +100,6 @@ static struct tty_driver *serial_driver;
100/* number of characters left in xmit buffer before we ask for more */ 100/* number of characters left in xmit buffer before we ask for more */
101#define WAKEUP_CHARS 256 101#define WAKEUP_CHARS 256
102 102
103static struct async_struct *IRQ_ports;
104
105static unsigned char current_ctl_bits; 103static unsigned char current_ctl_bits;
106 104
107static void change_speed(struct async_struct *info, struct ktermios *old); 105static void change_speed(struct async_struct *info, struct ktermios *old);
@@ -439,7 +437,7 @@ static void check_modem_status(struct async_struct *info)
439static irqreturn_t ser_vbl_int( int irq, void *data) 437static irqreturn_t ser_vbl_int( int irq, void *data)
440{ 438{
441 /* vbl is just a periodic interrupt we tie into to update modem status */ 439 /* vbl is just a periodic interrupt we tie into to update modem status */
442 struct async_struct * info = IRQ_ports; 440 struct async_struct *info = data;
443 /* 441 /*
444 * TBD - is it better to unregister from this interrupt or to 442 * TBD - is it better to unregister from this interrupt or to
445 * ignore it if MSI is clear ? 443 * ignore it if MSI is clear ?
@@ -451,13 +449,13 @@ static irqreturn_t ser_vbl_int( int irq, void *data)
451 449
452static irqreturn_t ser_rx_int(int irq, void *dev_id) 450static irqreturn_t ser_rx_int(int irq, void *dev_id)
453{ 451{
454 struct async_struct * info; 452 struct serial_state *state = dev_id;
453 struct async_struct *info = state->info;
455 454
456#ifdef SERIAL_DEBUG_INTR 455#ifdef SERIAL_DEBUG_INTR
457 printk("ser_rx_int..."); 456 printk("ser_rx_int...");
458#endif 457#endif
459 458
460 info = IRQ_ports;
461 if (!info || !info->tty) 459 if (!info || !info->tty)
462 return IRQ_NONE; 460 return IRQ_NONE;
463 461
@@ -470,14 +468,14 @@ static irqreturn_t ser_rx_int(int irq, void *dev_id)
470 468
471static irqreturn_t ser_tx_int(int irq, void *dev_id) 469static irqreturn_t ser_tx_int(int irq, void *dev_id)
472{ 470{
473 struct async_struct * info; 471 struct serial_state *state = dev_id;
472 struct async_struct *info = state->info;
474 473
475 if (custom.serdatr & SDR_TBE) { 474 if (custom.serdatr & SDR_TBE) {
476#ifdef SERIAL_DEBUG_INTR 475#ifdef SERIAL_DEBUG_INTR
477 printk("ser_tx_int..."); 476 printk("ser_tx_int...");
478#endif 477#endif
479 478
480 info = IRQ_ports;
481 if (!info || !info->tty) 479 if (!info || !info->tty)
482 return IRQ_NONE; 480 return IRQ_NONE;
483 481
@@ -554,8 +552,6 @@ static int startup(struct async_struct * info)
554 /* remember current state of the DCD and CTS bits */ 552 /* remember current state of the DCD and CTS bits */
555 current_ctl_bits = ciab.pra & (SER_DCD | SER_CTS | SER_DSR); 553 current_ctl_bits = ciab.pra & (SER_DCD | SER_CTS | SER_DSR);
556 554
557 IRQ_ports = info;
558
559 info->MCR = 0; 555 info->MCR = 0;
560 if (info->tty->termios->c_cflag & CBAUD) 556 if (info->tty->termios->c_cflag & CBAUD)
561 info->MCR = SER_DTR | SER_RTS; 557 info->MCR = SER_DTR | SER_RTS;
@@ -619,8 +615,6 @@ static void shutdown(struct async_struct * info)
619 */ 615 */
620 wake_up_interruptible(&info->delta_msr_wait); 616 wake_up_interruptible(&info->delta_msr_wait);
621 617
622 IRQ_ports = NULL;
623
624 /* 618 /*
625 * Free the IRQ, if necessary 619 * Free the IRQ, if necessary
626 */ 620 */
@@ -1913,8 +1907,6 @@ static int __init amiga_serial_probe(struct platform_device *pdev)
1913 if (!serial_driver) 1907 if (!serial_driver)
1914 return -ENOMEM; 1908 return -ENOMEM;
1915 1909
1916 IRQ_ports = NULL;
1917
1918 show_serial_version(); 1910 show_serial_version();
1919 1911
1920 /* Initialize the tty_driver structure */ 1912 /* Initialize the tty_driver structure */