diff options
Diffstat (limited to 'drivers/serial/68328serial.c')
-rw-r--r-- | drivers/serial/68328serial.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/serial/68328serial.c b/drivers/serial/68328serial.c index bbf5bc5892c7..381b12ac20e0 100644 --- a/drivers/serial/68328serial.c +++ b/drivers/serial/68328serial.c | |||
@@ -249,7 +249,7 @@ static void status_handle(struct m68k_serial *info, unsigned short status) | |||
249 | { | 249 | { |
250 | #if 0 | 250 | #if 0 |
251 | if(status & DCD) { | 251 | if(status & DCD) { |
252 | if((info->tty->termios->c_cflag & CRTSCTS) && | 252 | if((info->port.tty->termios->c_cflag & CRTSCTS) && |
253 | ((info->curregs[3] & AUTO_ENAB)==0)) { | 253 | ((info->curregs[3] & AUTO_ENAB)==0)) { |
254 | info->curregs[3] |= AUTO_ENAB; | 254 | info->curregs[3] |= AUTO_ENAB; |
255 | info->pendregs[3] |= AUTO_ENAB; | 255 | info->pendregs[3] |= AUTO_ENAB; |
@@ -274,7 +274,7 @@ static void status_handle(struct m68k_serial *info, unsigned short status) | |||
274 | 274 | ||
275 | static void receive_chars(struct m68k_serial *info, unsigned short rx) | 275 | static void receive_chars(struct m68k_serial *info, unsigned short rx) |
276 | { | 276 | { |
277 | struct tty_struct *tty = info->tty; | 277 | struct tty_struct *tty = info->port.tty; |
278 | m68328_uart *uart = &uart_addr[info->line]; | 278 | m68328_uart *uart = &uart_addr[info->line]; |
279 | unsigned char ch, flag; | 279 | unsigned char ch, flag; |
280 | 280 | ||
@@ -345,7 +345,7 @@ static void transmit_chars(struct m68k_serial *info) | |||
345 | goto clear_and_return; | 345 | goto clear_and_return; |
346 | } | 346 | } |
347 | 347 | ||
348 | if((info->xmit_cnt <= 0) || info->tty->stopped) { | 348 | if((info->xmit_cnt <= 0) || info->port.tty->stopped) { |
349 | /* That's peculiar... TX ints off */ | 349 | /* That's peculiar... TX ints off */ |
350 | uart->ustcnt &= ~USTCNT_TX_INTR_MASK; | 350 | uart->ustcnt &= ~USTCNT_TX_INTR_MASK; |
351 | goto clear_and_return; | 351 | goto clear_and_return; |
@@ -403,7 +403,7 @@ static void do_softint(struct work_struct *work) | |||
403 | struct m68k_serial *info = container_of(work, struct m68k_serial, tqueue); | 403 | struct m68k_serial *info = container_of(work, struct m68k_serial, tqueue); |
404 | struct tty_struct *tty; | 404 | struct tty_struct *tty; |
405 | 405 | ||
406 | tty = info->tty; | 406 | tty = info->port.tty; |
407 | if (!tty) | 407 | if (!tty) |
408 | return; | 408 | return; |
409 | #if 0 | 409 | #if 0 |
@@ -427,7 +427,7 @@ static void do_serial_hangup(struct work_struct *work) | |||
427 | struct m68k_serial *info = container_of(work, struct m68k_serial, tqueue_hangup); | 427 | struct m68k_serial *info = container_of(work, struct m68k_serial, tqueue_hangup); |
428 | struct tty_struct *tty; | 428 | struct tty_struct *tty; |
429 | 429 | ||
430 | tty = info->tty; | 430 | tty = info->port.tty; |
431 | if (!tty) | 431 | if (!tty) |
432 | return; | 432 | return; |
433 | 433 | ||
@@ -471,8 +471,8 @@ static int startup(struct m68k_serial * info) | |||
471 | uart->ustcnt = USTCNT_UEN | USTCNT_RXEN | USTCNT_RX_INTR_MASK; | 471 | uart->ustcnt = USTCNT_UEN | USTCNT_RXEN | USTCNT_RX_INTR_MASK; |
472 | #endif | 472 | #endif |
473 | 473 | ||
474 | if (info->tty) | 474 | if (info->port.tty) |
475 | clear_bit(TTY_IO_ERROR, &info->tty->flags); | 475 | clear_bit(TTY_IO_ERROR, &info->port.tty->flags); |
476 | info->xmit_cnt = info->xmit_head = info->xmit_tail = 0; | 476 | info->xmit_cnt = info->xmit_head = info->xmit_tail = 0; |
477 | 477 | ||
478 | /* | 478 | /* |
@@ -506,8 +506,8 @@ static void shutdown(struct m68k_serial * info) | |||
506 | info->xmit_buf = 0; | 506 | info->xmit_buf = 0; |
507 | } | 507 | } |
508 | 508 | ||
509 | if (info->tty) | 509 | if (info->port.tty) |
510 | set_bit(TTY_IO_ERROR, &info->tty->flags); | 510 | set_bit(TTY_IO_ERROR, &info->port.tty->flags); |
511 | 511 | ||
512 | info->flags &= ~S_INITIALIZED; | 512 | info->flags &= ~S_INITIALIZED; |
513 | local_irq_restore(flags); | 513 | local_irq_restore(flags); |
@@ -573,9 +573,9 @@ static void change_speed(struct m68k_serial *info) | |||
573 | unsigned cflag; | 573 | unsigned cflag; |
574 | int i; | 574 | int i; |
575 | 575 | ||
576 | if (!info->tty || !info->tty->termios) | 576 | if (!info->port.tty || !info->port.tty->termios) |
577 | return; | 577 | return; |
578 | cflag = info->tty->termios->c_cflag; | 578 | cflag = info->port.tty->termios->c_cflag; |
579 | if (!(port = info->port)) | 579 | if (!(port = info->port)) |
580 | return; | 580 | return; |
581 | 581 | ||
@@ -1131,7 +1131,7 @@ static void rs_close(struct tty_struct *tty, struct file * filp) | |||
1131 | tty_ldisc_flush(tty); | 1131 | tty_ldisc_flush(tty); |
1132 | tty->closing = 0; | 1132 | tty->closing = 0; |
1133 | info->event = 0; | 1133 | info->event = 0; |
1134 | info->tty = 0; | 1134 | info->port.tty = NULL; |
1135 | #warning "This is not and has never been valid so fix it" | 1135 | #warning "This is not and has never been valid so fix it" |
1136 | #if 0 | 1136 | #if 0 |
1137 | if (tty->ldisc.num != ldiscs[N_TTY].num) { | 1137 | if (tty->ldisc.num != ldiscs[N_TTY].num) { |
@@ -1169,7 +1169,7 @@ void rs_hangup(struct tty_struct *tty) | |||
1169 | info->event = 0; | 1169 | info->event = 0; |
1170 | info->count = 0; | 1170 | info->count = 0; |
1171 | info->flags &= ~S_NORMAL_ACTIVE; | 1171 | info->flags &= ~S_NORMAL_ACTIVE; |
1172 | info->tty = 0; | 1172 | info->port.tty = NULL; |
1173 | wake_up_interruptible(&info->open_wait); | 1173 | wake_up_interruptible(&info->open_wait); |
1174 | } | 1174 | } |
1175 | 1175 | ||
@@ -1286,7 +1286,7 @@ int rs_open(struct tty_struct *tty, struct file * filp) | |||
1286 | 1286 | ||
1287 | info->count++; | 1287 | info->count++; |
1288 | tty->driver_data = info; | 1288 | tty->driver_data = info; |
1289 | info->tty = tty; | 1289 | info->port.tty = tty; |
1290 | 1290 | ||
1291 | /* | 1291 | /* |
1292 | * Start up serial port | 1292 | * Start up serial port |
@@ -1363,7 +1363,7 @@ rs68328_init(void) | |||
1363 | info = &m68k_soft[i]; | 1363 | info = &m68k_soft[i]; |
1364 | info->magic = SERIAL_MAGIC; | 1364 | info->magic = SERIAL_MAGIC; |
1365 | info->port = (int) &uart_addr[i]; | 1365 | info->port = (int) &uart_addr[i]; |
1366 | info->tty = 0; | 1366 | info->port.tty = NULL; |
1367 | info->irq = uart_irqs[i]; | 1367 | info->irq = uart_irqs[i]; |
1368 | info->custom_divisor = 16; | 1368 | info->custom_divisor = 16; |
1369 | info->close_delay = 50; | 1369 | info->close_delay = 50; |