Commit 056abede authored by Al Viro's avatar Al Viro

f81232: switch to ->get_serial()

Reviewed-by: default avatarJohan Hovold <johan@kernel.org>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent aadcd0a1
......@@ -583,36 +583,16 @@ static int f81232_carrier_raised(struct usb_serial_port *port)
return 0;
}
static int f81232_get_serial_info(struct usb_serial_port *port,
unsigned long arg)
{
struct serial_struct ser;
memset(&ser, 0, sizeof(ser));
ser.type = PORT_16550A;
ser.line = port->minor;
ser.port = port->port_number;
ser.baud_base = F81232_MAX_BAUDRATE;
if (copy_to_user((void __user *)arg, &ser, sizeof(ser)))
return -EFAULT;
return 0;
}
static int f81232_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg)
static int f81232_get_serial_info(struct tty_struct *tty,
struct serial_struct *ss)
{
struct usb_serial_port *port = tty->driver_data;
switch (cmd) {
case TIOCGSERIAL:
return f81232_get_serial_info(port, arg);
default:
break;
}
return -ENOIOCTLCMD;
ss->type = PORT_16550A;
ss->line = port->minor;
ss->port = port->port_number;
ss->baud_base = F81232_MAX_BAUDRATE;
return 0;
}
static void f81232_interrupt_work(struct work_struct *work)
......@@ -665,7 +645,7 @@ static struct usb_serial_driver f81232_device = {
.close = f81232_close,
.dtr_rts = f81232_dtr_rts,
.carrier_raised = f81232_carrier_raised,
.ioctl = f81232_ioctl,
.get_serial = f81232_get_serial_info,
.break_ctl = f81232_break_ctl,
.set_termios = f81232_set_termios,
.tiocmget = f81232_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