aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/kobil_sct.c
diff options
context:
space:
mode:
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);