aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/riscom8.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/riscom8.c')
-rw-r--r--drivers/char/riscom8.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/char/riscom8.c b/drivers/char/riscom8.c
index 5ab32b38f45a..0a77bfcd5b5e 100644
--- a/drivers/char/riscom8.c
+++ b/drivers/char/riscom8.c
@@ -82,11 +82,6 @@
82static struct riscom_board * IRQ_to_board[16]; 82static struct riscom_board * IRQ_to_board[16];
83static struct tty_driver *riscom_driver; 83static struct tty_driver *riscom_driver;
84 84
85static unsigned long baud_table[] = {
86 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800,
87 9600, 19200, 38400, 57600, 76800, 0,
88};
89
90static struct riscom_board rc_board[RC_NBOARD] = { 85static struct riscom_board rc_board[RC_NBOARD] = {
91 { 86 {
92 .base = RC_IOBASE1, 87 .base = RC_IOBASE1,
@@ -1516,9 +1511,9 @@ static void rc_start(struct tty_struct * tty)
1516 * do_rc_hangup() -> tty->hangup() -> rc_hangup() 1511 * do_rc_hangup() -> tty->hangup() -> rc_hangup()
1517 * 1512 *
1518 */ 1513 */
1519static void do_rc_hangup(void *private_) 1514static void do_rc_hangup(struct work_struct *ugly_api)
1520{ 1515{
1521 struct riscom_port *port = (struct riscom_port *) private_; 1516 struct riscom_port *port = container_of(ugly_api, struct riscom_port, tqueue_hangup);
1522 struct tty_struct *tty; 1517 struct tty_struct *tty;
1523 1518
1524 tty = port->tty; 1519 tty = port->tty;
@@ -1567,9 +1562,9 @@ static void rc_set_termios(struct tty_struct * tty, struct termios * old_termios
1567 } 1562 }
1568} 1563}
1569 1564
1570static void do_softint(void *private_) 1565static void do_softint(struct work_struct *ugly_api)
1571{ 1566{
1572 struct riscom_port *port = (struct riscom_port *) private_; 1567 struct riscom_port *port = container_of(ugly_api, struct riscom_port, tqueue);
1573 struct tty_struct *tty; 1568 struct tty_struct *tty;
1574 1569
1575 if(!(tty = port->tty)) 1570 if(!(tty = port->tty))
@@ -1632,8 +1627,8 @@ static inline int rc_init_drivers(void)
1632 memset(rc_port, 0, sizeof(rc_port)); 1627 memset(rc_port, 0, sizeof(rc_port));
1633 for (i = 0; i < RC_NPORT * RC_NBOARD; i++) { 1628 for (i = 0; i < RC_NPORT * RC_NBOARD; i++) {
1634 rc_port[i].magic = RISCOM8_MAGIC; 1629 rc_port[i].magic = RISCOM8_MAGIC;
1635 INIT_WORK(&rc_port[i].tqueue, do_softint, &rc_port[i]); 1630 INIT_WORK(&rc_port[i].tqueue, do_softint);
1636 INIT_WORK(&rc_port[i].tqueue_hangup, do_rc_hangup, &rc_port[i]); 1631 INIT_WORK(&rc_port[i].tqueue_hangup, do_rc_hangup);
1637 rc_port[i].close_delay = 50 * HZ/100; 1632 rc_port[i].close_delay = 50 * HZ/100;
1638 rc_port[i].closing_wait = 3000 * HZ/100; 1633 rc_port[i].closing_wait = 3000 * HZ/100;
1639 init_waitqueue_head(&rc_port[i].open_wait); 1634 init_waitqueue_head(&rc_port[i].open_wait);