diff options
Diffstat (limited to 'drivers/char/riscom8.c')
-rw-r--r-- | drivers/char/riscom8.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/char/riscom8.c b/drivers/char/riscom8.c index 5ab32b3..0a77bfc 100644 --- a/drivers/char/riscom8.c +++ b/drivers/char/riscom8.c @@ -82,11 +82,6 @@ static struct riscom_board * IRQ_to_board[16]; static struct tty_driver *riscom_driver; -static unsigned long baud_table[] = { - 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, - 9600, 19200, 38400, 57600, 76800, 0, -}; - static struct riscom_board rc_board[RC_NBOARD] = { { .base = RC_IOBASE1, @@ -1516,9 +1511,9 @@ static void rc_start(struct tty_struct * tty) * do_rc_hangup() -> tty->hangup() -> rc_hangup() * */ -static void do_rc_hangup(void *private_) +static void do_rc_hangup(struct work_struct *ugly_api) { - struct riscom_port *port = (struct riscom_port *) private_; + struct riscom_port *port = container_of(ugly_api, struct riscom_port, tqueue_hangup); struct tty_struct *tty; tty = port->tty; @@ -1567,9 +1562,9 @@ static void rc_set_termios(struct tty_struct * tty, struct termios * old_termios } } -static void do_softint(void *private_) +static void do_softint(struct work_struct *ugly_api) { - struct riscom_port *port = (struct riscom_port *) private_; + struct riscom_port *port = container_of(ugly_api, struct riscom_port, tqueue); struct tty_struct *tty; if(!(tty = port->tty)) @@ -1632,8 +1627,8 @@ static inline int rc_init_drivers(void) memset(rc_port, 0, sizeof(rc_port)); for (i = 0; i < RC_NPORT * RC_NBOARD; i++) { rc_port[i].magic = RISCOM8_MAGIC; - INIT_WORK(&rc_port[i].tqueue, do_softint, &rc_port[i]); - INIT_WORK(&rc_port[i].tqueue_hangup, do_rc_hangup, &rc_port[i]); + INIT_WORK(&rc_port[i].tqueue, do_softint); + INIT_WORK(&rc_port[i].tqueue_hangup, do_rc_hangup); rc_port[i].close_delay = 50 * HZ/100; rc_port[i].closing_wait = 3000 * HZ/100; init_waitqueue_head(&rc_port[i].open_wait); |