aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/kobil_sct.c
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2006-12-08 05:38:45 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 11:28:57 -0500
commit606d099cdd1080bbb50ea50dc52d98252f8f10a1 (patch)
tree80d17450a5fb78effce3f4312f672c058658e004 /drivers/usb/serial/kobil_sct.c
parentedc6afc5496875a640bef0913604be7550c1795d (diff)
[PATCH] tty: switch to ktermios
This is the grungy swap all the occurrences in the right places patch that goes with the updates. At this point we have the same functionality as before (except that sgttyb() returns speeds not zero) and are ready to begin turning new stuff on providing nobody reports lots of bugs If you are a tty driver author converting an out of tree driver the only impact should be termios->ktermios name changes for the speed/property setting functions from your upper layers. If you are implementing your own TCGETS function before then your driver was broken already and its about to get a whole lot more painful for you so please fix it 8) Also fill in c_ispeed/ospeed on init for most devices, although the current code will do this for you anyway but I'd like eventually to lose that extra paranoia [akpm@osdl.org: bluetooth fix] [mp3@de.ibm.com: sclp fix] [mp3@de.ibm.com: warning fix for tty3270] [hugh@veritas.com: fix tty_ioctl powerpc build] [jdike@addtoit.com: uml: fix ->set_termios declaration] Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Martin Peschke <mp3@de.ibm.com> Acked-by: Peter Oberparleiter <oberpar@de.ibm.com> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/usb/serial/kobil_sct.c')
-rw-r--r--drivers/usb/serial/kobil_sct.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c
index 237289920f03..e284d6c0fd35 100644
--- a/drivers/usb/serial/kobil_sct.c
+++ b/drivers/usb/serial/kobil_sct.c
@@ -136,7 +136,7 @@ struct kobil_private {
136 int cur_pos; // index of the next char to send in buf 136 int cur_pos; // index of the next char to send in buf
137 __u16 device_type; 137 __u16 device_type;
138 int line_state; 138 int line_state;
139 struct termios internal_termios; 139 struct ktermios internal_termios;
140}; 140};
141 141
142 142
@@ -624,11 +624,11 @@ static int kobil_ioctl(struct usb_serial_port *port, struct file *file,
624 624
625 switch (cmd) { 625 switch (cmd) {
626 case TCGETS: // 0x5401 626 case TCGETS: // 0x5401
627 if (!access_ok(VERIFY_WRITE, user_arg, sizeof(struct termios))) { 627 if (!access_ok(VERIFY_WRITE, user_arg, sizeof(struct ktermios))) {
628 dbg("%s - port %d Error in access_ok", __FUNCTION__, port->number); 628 dbg("%s - port %d Error in access_ok", __FUNCTION__, port->number);
629 return -EFAULT; 629 return -EFAULT;
630 } 630 }
631 if (kernel_termios_to_user_termios((struct termios __user *)arg, 631 if (kernel_termios_to_user_termios((struct ktermios __user *)arg,
632 &priv->internal_termios)) 632 &priv->internal_termios))
633 return -EFAULT; 633 return -EFAULT;
634 return 0; 634 return 0;
@@ -638,12 +638,12 @@ static int kobil_ioctl(struct usb_serial_port *port, struct file *file,
638 dbg("%s - port %d Error: port->tty->termios is NULL", __FUNCTION__, port->number); 638 dbg("%s - port %d Error: port->tty->termios is NULL", __FUNCTION__, port->number);
639 return -ENOTTY; 639 return -ENOTTY;
640 } 640 }
641 if (!access_ok(VERIFY_READ, user_arg, sizeof(struct termios))) { 641 if (!access_ok(VERIFY_READ, user_arg, sizeof(struct ktermios))) {
642 dbg("%s - port %d Error in access_ok", __FUNCTION__, port->number); 642 dbg("%s - port %d Error in access_ok", __FUNCTION__, port->number);
643 return -EFAULT; 643 return -EFAULT;
644 } 644 }
645 if (user_termios_to_kernel_termios(&priv->internal_termios, 645 if (user_termios_to_kernel_termios(&priv->internal_termios,
646 (struct termios __user *)arg)) 646 (struct ktermios __user *)arg))
647 return -EFAULT; 647 return -EFAULT;
648 648
649 settings = kzalloc(50, GFP_KERNEL); 649 settings = kzalloc(50, GFP_KERNEL);