aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/68328serial.c
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2008-04-30 03:53:59 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-30 11:29:45 -0400
commit978e595f88a1fba5869aa42a4af4fba36f33ecac (patch)
tree60848f49949c5b7b518621ee36cdc6d500244539 /drivers/serial/68328serial.c
parentac0e4b7d319bf284bb64bc7e1c051417386b34a4 (diff)
tty/serial: lay the foundations for the next set of reworks
- Stop drivers calling their own flush method indirectly, it obfuscates code and it will change soon anyway - A few more lock_kernel paths temporarily needed in some driver internal waiting code - Remove private put_char method that does a write call for one char - we have that anyway - Most but not yet all of the termios copy under lock fixing (some has other dependencies to follow) - Note a few locking bugs in drivers found in the process - Kill remaining [ab]users of TIOCG/SSOFTCAR in the driver, these must go to fix the termios locking Signed-off-by: Alan Cox <alan@redhat.com> Cc: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/serial/68328serial.c')
-rw-r--r--drivers/serial/68328serial.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/serial/68328serial.c b/drivers/serial/68328serial.c
index 2b8a410e0959..5ce3e57bff0b 100644
--- a/drivers/serial/68328serial.c
+++ b/drivers/serial/68328serial.c
@@ -1017,18 +1017,6 @@ static int rs_ioctl(struct tty_struct *tty, struct file * file,
1017 tty_wait_until_sent(tty, 0); 1017 tty_wait_until_sent(tty, 0);
1018 send_break(info, arg ? arg*(100) : 250); 1018 send_break(info, arg ? arg*(100) : 250);
1019 return 0; 1019 return 0;
1020 case TIOCGSOFTCAR:
1021 error = put_user(C_CLOCAL(tty) ? 1 : 0,
1022 (unsigned long *) arg);
1023 if (error)
1024 return error;
1025 return 0;
1026 case TIOCSSOFTCAR:
1027 get_user(arg, (unsigned long *) arg);
1028 tty->termios->c_cflag =
1029 ((tty->termios->c_cflag & ~CLOCAL) |
1030 (arg ? CLOCAL : 0));
1031 return 0;
1032 case TIOCGSERIAL: 1020 case TIOCGSERIAL:
1033 if (access_ok(VERIFY_WRITE, (void *) arg, 1021 if (access_ok(VERIFY_WRITE, (void *) arg,
1034 sizeof(struct serial_struct))) 1022 sizeof(struct serial_struct)))
@@ -1061,9 +1049,6 @@ static void rs_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
1061{ 1049{
1062 struct m68k_serial *info = (struct m68k_serial *)tty->driver_data; 1050 struct m68k_serial *info = (struct m68k_serial *)tty->driver_data;
1063 1051
1064 if (tty->termios->c_cflag == old_termios->c_cflag)
1065 return;
1066
1067 change_speed(info); 1052 change_speed(info);
1068 1053
1069 if ((old_termios->c_cflag & CRTSCTS) && 1054 if ((old_termios->c_cflag & CRTSCTS) &&
@@ -1140,8 +1125,7 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
1140 uart->ustcnt &= ~(USTCNT_RXEN | USTCNT_RX_INTR_MASK); 1125 uart->ustcnt &= ~(USTCNT_RXEN | USTCNT_RX_INTR_MASK);
1141 1126
1142 shutdown(info); 1127 shutdown(info);
1143 if (tty->driver->flush_buffer) 1128 rs_flush_buffer(tty);
1144 tty->driver->flush_buffer(tty);
1145 1129
1146 tty_ldisc_flush(tty); 1130 tty_ldisc_flush(tty);
1147 tty->closing = 0; 1131 tty->closing = 0;