aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/68328serial.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2011-02-24 14:36:31 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-02-24 14:36:31 -0500
commitf227e08b71b9c273eaa29a57370a3a5b833aa382 (patch)
tree9f1483776a2bde3bb1a6bd744e69acf19f6f3428 /drivers/tty/serial/68328serial.c
parentfec38d1752c01ad72789bac9f1a128f7e933735d (diff)
parentf5412be599602124d2bdd49947b231dd77c0bf99 (diff)
Merge 2.6.38-rc6 into tty-next
This was to resolve a merge issue with drivers/char/Makefile and drivers/tty/serial/68328serial.c Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/tty/serial/68328serial.c')
-rw-r--r--drivers/tty/serial/68328serial.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/drivers/tty/serial/68328serial.c b/drivers/tty/serial/68328serial.c
index 1de0e8d4bde1..d5bfd41707e7 100644
--- a/drivers/tty/serial/68328serial.c
+++ b/drivers/tty/serial/68328serial.c
@@ -262,7 +262,7 @@ static void status_handle(struct m68k_serial *info, unsigned short status)
262 262
263static void receive_chars(struct m68k_serial *info, unsigned short rx) 263static void receive_chars(struct m68k_serial *info, unsigned short rx)
264{ 264{
265 struct tty_struct *tty = info->port.tty; 265 struct tty_struct *tty = info->tty;
266 m68328_uart *uart = &uart_addr[info->line]; 266 m68328_uart *uart = &uart_addr[info->line];
267 unsigned char ch, flag; 267 unsigned char ch, flag;
268 268
@@ -329,7 +329,7 @@ static void transmit_chars(struct m68k_serial *info)
329 goto clear_and_return; 329 goto clear_and_return;
330 } 330 }
331 331
332 if((info->xmit_cnt <= 0) || info->port.tty->stopped) { 332 if((info->xmit_cnt <= 0) || info->tty->stopped) {
333 /* That's peculiar... TX ints off */ 333 /* That's peculiar... TX ints off */
334 uart->ustcnt &= ~USTCNT_TX_INTR_MASK; 334 uart->ustcnt &= ~USTCNT_TX_INTR_MASK;
335 goto clear_and_return; 335 goto clear_and_return;
@@ -383,7 +383,7 @@ static void do_softint(struct work_struct *work)
383 struct m68k_serial *info = container_of(work, struct m68k_serial, tqueue); 383 struct m68k_serial *info = container_of(work, struct m68k_serial, tqueue);
384 struct tty_struct *tty; 384 struct tty_struct *tty;
385 385
386 tty = info->port.tty; 386 tty = info->tty;
387 if (!tty) 387 if (!tty)
388 return; 388 return;
389#if 0 389#if 0
@@ -429,8 +429,8 @@ static int startup(struct m68k_serial * info)
429 uart->ustcnt = USTCNT_UEN | USTCNT_RXEN | USTCNT_RX_INTR_MASK; 429 uart->ustcnt = USTCNT_UEN | USTCNT_RXEN | USTCNT_RX_INTR_MASK;
430#endif 430#endif
431 431
432 if (info->port.tty) 432 if (info->tty)
433 clear_bit(TTY_IO_ERROR, &info->port.tty->flags); 433 clear_bit(TTY_IO_ERROR, &info->tty->flags);
434 info->xmit_cnt = info->xmit_head = info->xmit_tail = 0; 434 info->xmit_cnt = info->xmit_head = info->xmit_tail = 0;
435 435
436 /* 436 /*
@@ -464,8 +464,8 @@ static void shutdown(struct m68k_serial * info)
464 info->xmit_buf = 0; 464 info->xmit_buf = 0;
465 } 465 }
466 466
467 if (info->port.tty) 467 if (info->tty)
468 set_bit(TTY_IO_ERROR, &info->port.tty->flags); 468 set_bit(TTY_IO_ERROR, &info->tty->flags);
469 469
470 info->flags &= ~S_INITIALIZED; 470 info->flags &= ~S_INITIALIZED;
471 local_irq_restore(flags); 471 local_irq_restore(flags);
@@ -531,9 +531,9 @@ static void change_speed(struct m68k_serial *info)
531 unsigned cflag; 531 unsigned cflag;
532 int i; 532 int i;
533 533
534 if (!info->port.tty || !info->port.tty->termios) 534 if (!info->tty || !info->tty->termios)
535 return; 535 return;
536 cflag = info->port.tty->termios->c_cflag; 536 cflag = info->tty->termios->c_cflag;
537 if (!(port = info->port)) 537 if (!(port = info->port))
538 return; 538 return;
539 539
@@ -948,7 +948,6 @@ static void send_break(struct m68k_serial * info, unsigned int duration)
948static int rs_ioctl(struct tty_struct *tty, 948static int rs_ioctl(struct tty_struct *tty,
949 unsigned int cmd, unsigned long arg) 949 unsigned int cmd, unsigned long arg)
950{ 950{
951 int error;
952 struct m68k_serial * info = (struct m68k_serial *)tty->driver_data; 951 struct m68k_serial * info = (struct m68k_serial *)tty->driver_data;
953 int retval; 952 int retval;
954 953
@@ -1082,7 +1081,7 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
1082 tty_ldisc_flush(tty); 1081 tty_ldisc_flush(tty);
1083 tty->closing = 0; 1082 tty->closing = 0;
1084 info->event = 0; 1083 info->event = 0;
1085 info->port.tty = NULL; 1084 info->tty = NULL;
1086#warning "This is not and has never been valid so fix it" 1085#warning "This is not and has never been valid so fix it"
1087#if 0 1086#if 0
1088 if (tty->ldisc.num != ldiscs[N_TTY].num) { 1087 if (tty->ldisc.num != ldiscs[N_TTY].num) {
@@ -1120,7 +1119,7 @@ void rs_hangup(struct tty_struct *tty)
1120 info->event = 0; 1119 info->event = 0;
1121 info->count = 0; 1120 info->count = 0;
1122 info->flags &= ~S_NORMAL_ACTIVE; 1121 info->flags &= ~S_NORMAL_ACTIVE;
1123 info->port.tty = NULL; 1122 info->tty = NULL;
1124 wake_up_interruptible(&info->open_wait); 1123 wake_up_interruptible(&info->open_wait);
1125} 1124}
1126 1125
@@ -1239,7 +1238,7 @@ int rs_open(struct tty_struct *tty, struct file * filp)
1239 1238
1240 info->count++; 1239 info->count++;
1241 tty->driver_data = info; 1240 tty->driver_data = info;
1242 info->port.tty = tty; 1241 info->tty = tty;
1243 1242
1244 /* 1243 /*
1245 * Start up serial port 1244 * Start up serial port
@@ -1316,7 +1315,7 @@ rs68328_init(void)
1316 info = &m68k_soft[i]; 1315 info = &m68k_soft[i];
1317 info->magic = SERIAL_MAGIC; 1316 info->magic = SERIAL_MAGIC;
1318 info->port = (int) &uart_addr[i]; 1317 info->port = (int) &uart_addr[i];
1319 info->port.tty = NULL; 1318 info->tty = NULL;
1320 info->irq = uart_irqs[i]; 1319 info->irq = uart_irqs[i];
1321 info->custom_divisor = 16; 1320 info->custom_divisor = 16;
1322 info->close_delay = 50; 1321 info->close_delay = 50;