Commit 1c9f9953 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

USB: oti6858: replace custom ioctl operation with tiocmiwait

Replace custom ioctl operation with tiocmiwait.
Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0c613371
...@@ -124,8 +124,6 @@ static void oti6858_close(struct usb_serial_port *port); ...@@ -124,8 +124,6 @@ static void oti6858_close(struct usb_serial_port *port);
static void oti6858_set_termios(struct tty_struct *tty, static void oti6858_set_termios(struct tty_struct *tty,
struct usb_serial_port *port, struct ktermios *old); struct usb_serial_port *port, struct ktermios *old);
static void oti6858_init_termios(struct tty_struct *tty); static void oti6858_init_termios(struct tty_struct *tty);
static int oti6858_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg);
static void oti6858_read_int_callback(struct urb *urb); static void oti6858_read_int_callback(struct urb *urb);
static void oti6858_read_bulk_callback(struct urb *urb); static void oti6858_read_bulk_callback(struct urb *urb);
static void oti6858_write_bulk_callback(struct urb *urb); static void oti6858_write_bulk_callback(struct urb *urb);
...@@ -136,6 +134,7 @@ static int oti6858_chars_in_buffer(struct tty_struct *tty); ...@@ -136,6 +134,7 @@ static int oti6858_chars_in_buffer(struct tty_struct *tty);
static int oti6858_tiocmget(struct tty_struct *tty); static int oti6858_tiocmget(struct tty_struct *tty);
static int oti6858_tiocmset(struct tty_struct *tty, static int oti6858_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear); unsigned int set, unsigned int clear);
static int oti6858_tiocmiwait(struct tty_struct *tty, unsigned long arg);
static int oti6858_port_probe(struct usb_serial_port *port); static int oti6858_port_probe(struct usb_serial_port *port);
static int oti6858_port_remove(struct usb_serial_port *port); static int oti6858_port_remove(struct usb_serial_port *port);
...@@ -150,11 +149,11 @@ static struct usb_serial_driver oti6858_device = { ...@@ -150,11 +149,11 @@ static struct usb_serial_driver oti6858_device = {
.open = oti6858_open, .open = oti6858_open,
.close = oti6858_close, .close = oti6858_close,
.write = oti6858_write, .write = oti6858_write,
.ioctl = oti6858_ioctl,
.set_termios = oti6858_set_termios, .set_termios = oti6858_set_termios,
.init_termios = oti6858_init_termios, .init_termios = oti6858_init_termios,
.tiocmget = oti6858_tiocmget, .tiocmget = oti6858_tiocmget,
.tiocmset = oti6858_tiocmset, .tiocmset = oti6858_tiocmset,
.tiocmiwait = oti6858_tiocmiwait,
.read_bulk_callback = oti6858_read_bulk_callback, .read_bulk_callback = oti6858_read_bulk_callback,
.read_int_callback = oti6858_read_int_callback, .read_int_callback = oti6858_read_int_callback,
.write_bulk_callback = oti6858_write_bulk_callback, .write_bulk_callback = oti6858_write_bulk_callback,
...@@ -650,8 +649,9 @@ static int oti6858_tiocmget(struct tty_struct *tty) ...@@ -650,8 +649,9 @@ static int oti6858_tiocmget(struct tty_struct *tty)
return result; return result;
} }
static int wait_modem_info(struct usb_serial_port *port, unsigned int arg) static int oti6858_tiocmiwait(struct tty_struct *tty, unsigned long arg)
{ {
struct usb_serial_port *port = tty->driver_data;
struct oti6858_private *priv = usb_get_serial_port_data(port); struct oti6858_private *priv = usb_get_serial_port_data(port);
unsigned long flags; unsigned long flags;
unsigned int prev, status; unsigned int prev, status;
...@@ -689,24 +689,6 @@ static int wait_modem_info(struct usb_serial_port *port, unsigned int arg) ...@@ -689,24 +689,6 @@ static int wait_modem_info(struct usb_serial_port *port, unsigned int arg)
return 0; return 0;
} }
static int oti6858_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg)
{
struct usb_serial_port *port = tty->driver_data;
dev_dbg(&port->dev, "%s(cmd = 0x%04x, arg = 0x%08lx)\n", __func__, cmd, arg);
switch (cmd) {
case TIOCMIWAIT:
dev_dbg(&port->dev, "%s(): TIOCMIWAIT\n", __func__);
return wait_modem_info(port, arg);
default:
dev_dbg(&port->dev, "%s(): 0x%04x not supported\n", __func__, cmd);
break;
}
return -ENOIOCTLCMD;
}
static void oti6858_read_int_callback(struct urb *urb) static void oti6858_read_int_callback(struct urb *urb)
{ {
struct usb_serial_port *port = urb->context; struct usb_serial_port *port = urb->context;
......
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