Commit 9326ec59 authored by Al Viro's avatar Al Viro

pl2303: switch to ->get_serial()

Reviewed-by: default avatarJohan Hovold <johan@kernel.org>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 30296aa4
...@@ -808,29 +808,16 @@ static int pl2303_carrier_raised(struct usb_serial_port *port) ...@@ -808,29 +808,16 @@ static int pl2303_carrier_raised(struct usb_serial_port *port)
return 0; return 0;
} }
static int pl2303_ioctl(struct tty_struct *tty, static int pl2303_get_serial(struct tty_struct *tty,
unsigned int cmd, unsigned long arg) struct serial_struct *ss)
{ {
struct serial_struct ser;
struct usb_serial_port *port = tty->driver_data; struct usb_serial_port *port = tty->driver_data;
switch (cmd) { ss->type = PORT_16654;
case TIOCGSERIAL: ss->line = port->minor;
memset(&ser, 0, sizeof ser); ss->port = port->port_number;
ser.type = PORT_16654; ss->baud_base = 460800;
ser.line = port->minor; return 0;
ser.port = port->port_number;
ser.baud_base = 460800;
if (copy_to_user((void __user *)arg, &ser, sizeof ser))
return -EFAULT;
return 0;
default:
break;
}
return -ENOIOCTLCMD;
} }
static void pl2303_set_break(struct usb_serial_port *port, bool enable) static void pl2303_set_break(struct usb_serial_port *port, bool enable)
...@@ -1016,7 +1003,7 @@ static struct usb_serial_driver pl2303_device = { ...@@ -1016,7 +1003,7 @@ static struct usb_serial_driver pl2303_device = {
.close = pl2303_close, .close = pl2303_close,
.dtr_rts = pl2303_dtr_rts, .dtr_rts = pl2303_dtr_rts,
.carrier_raised = pl2303_carrier_raised, .carrier_raised = pl2303_carrier_raised,
.ioctl = pl2303_ioctl, .get_serial = pl2303_get_serial,
.break_ctl = pl2303_break_ctl, .break_ctl = pl2303_break_ctl,
.set_termios = pl2303_set_termios, .set_termios = pl2303_set_termios,
.tiocmget = pl2303_tiocmget, .tiocmget = pl2303_tiocmget,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment