mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-18 10:13:57 +08:00
f81232: switch to ->get_serial()
Reviewed-by: Johan Hovold <johan@kernel.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
aadcd0a178
commit
056abede09
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user