diff options
Diffstat (limited to 'drivers/tty/serial/68328serial.c')
-rw-r--r-- | drivers/tty/serial/68328serial.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/drivers/tty/serial/68328serial.c b/drivers/tty/serial/68328serial.c index 3ed20e435e59..66c38a3f74ce 100644 --- a/drivers/tty/serial/68328serial.c +++ b/drivers/tty/serial/68328serial.c | |||
@@ -515,7 +515,7 @@ static void change_speed(struct m68k_serial *info, struct tty_struct *tty) | |||
515 | unsigned cflag; | 515 | unsigned cflag; |
516 | int i; | 516 | int i; |
517 | 517 | ||
518 | cflag = tty->termios->c_cflag; | 518 | cflag = tty->termios.c_cflag; |
519 | if (!(port = info->port)) | 519 | if (!(port = info->port)) |
520 | return; | 520 | return; |
521 | 521 | ||
@@ -617,7 +617,7 @@ static void rs_set_ldisc(struct tty_struct *tty) | |||
617 | if (serial_paranoia_check(info, tty->name, "rs_set_ldisc")) | 617 | if (serial_paranoia_check(info, tty->name, "rs_set_ldisc")) |
618 | return; | 618 | return; |
619 | 619 | ||
620 | info->is_cons = (tty->termios->c_line == N_TTY); | 620 | info->is_cons = (tty->termios.c_line == N_TTY); |
621 | 621 | ||
622 | printk("ttyS%d console mode %s\n", info->line, info->is_cons ? "on" : "off"); | 622 | printk("ttyS%d console mode %s\n", info->line, info->is_cons ? "on" : "off"); |
623 | } | 623 | } |
@@ -985,7 +985,7 @@ static void rs_set_termios(struct tty_struct *tty, struct ktermios *old_termios) | |||
985 | change_speed(info, tty); | 985 | change_speed(info, tty); |
986 | 986 | ||
987 | if ((old_termios->c_cflag & CRTSCTS) && | 987 | if ((old_termios->c_cflag & CRTSCTS) && |
988 | !(tty->termios->c_cflag & CRTSCTS)) { | 988 | !(tty->termios.c_cflag & CRTSCTS)) { |
989 | tty->hw_stopped = 0; | 989 | tty->hw_stopped = 0; |
990 | rs_start(tty); | 990 | rs_start(tty); |
991 | } | 991 | } |
@@ -1070,7 +1070,7 @@ static void rs_close(struct tty_struct *tty, struct file * filp) | |||
1070 | if (tty->ldisc.close) | 1070 | if (tty->ldisc.close) |
1071 | (tty->ldisc.close)(tty); | 1071 | (tty->ldisc.close)(tty); |
1072 | tty->ldisc = ldiscs[N_TTY]; | 1072 | tty->ldisc = ldiscs[N_TTY]; |
1073 | tty->termios->c_line = N_TTY; | 1073 | tty->termios.c_line = N_TTY; |
1074 | if (tty->ldisc.open) | 1074 | if (tty->ldisc.open) |
1075 | (tty->ldisc.open)(tty); | 1075 | (tty->ldisc.open)(tty); |
1076 | } | 1076 | } |
@@ -1189,12 +1189,6 @@ rs68328_init(void) | |||
1189 | serial_driver->flags = TTY_DRIVER_REAL_RAW; | 1189 | serial_driver->flags = TTY_DRIVER_REAL_RAW; |
1190 | tty_set_operations(serial_driver, &rs_ops); | 1190 | tty_set_operations(serial_driver, &rs_ops); |
1191 | 1191 | ||
1192 | if (tty_register_driver(serial_driver)) { | ||
1193 | put_tty_driver(serial_driver); | ||
1194 | printk(KERN_ERR "Couldn't register serial driver\n"); | ||
1195 | return -ENOMEM; | ||
1196 | } | ||
1197 | |||
1198 | local_irq_save(flags); | 1192 | local_irq_save(flags); |
1199 | 1193 | ||
1200 | for(i=0;i<NR_PORTS;i++) { | 1194 | for(i=0;i<NR_PORTS;i++) { |
@@ -1224,8 +1218,17 @@ rs68328_init(void) | |||
1224 | 0, | 1218 | 0, |
1225 | "M68328_UART", info)) | 1219 | "M68328_UART", info)) |
1226 | panic("Unable to attach 68328 serial interrupt\n"); | 1220 | panic("Unable to attach 68328 serial interrupt\n"); |
1221 | |||
1222 | tty_port_link_device(&info->tport, serial_driver, i); | ||
1227 | } | 1223 | } |
1228 | local_irq_restore(flags); | 1224 | local_irq_restore(flags); |
1225 | |||
1226 | if (tty_register_driver(serial_driver)) { | ||
1227 | put_tty_driver(serial_driver); | ||
1228 | printk(KERN_ERR "Couldn't register serial driver\n"); | ||
1229 | return -ENOMEM; | ||
1230 | } | ||
1231 | |||
1229 | return 0; | 1232 | return 0; |
1230 | } | 1233 | } |
1231 | 1234 | ||