aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2013-03-21 07:37:20 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-25 16:52:25 -0400
commit824d11bef5540062d17380c65ee52d4b2948ca84 (patch)
tree19516fea8326dd20df0b3cb39c8f4759cc4933f5 /drivers/usb/serial
parent215f6f04668e80543995300c9528ac0143fcda7f (diff)
USB: pl2303: add custom tiocmiwait operation
Break out TIOCMIWAIT handling from custom ioctl operation and use tiocmiwait operation field instead. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r--drivers/usb/serial/pl2303.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index e7e407b67994..1f7fd1aaa2f5 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -593,8 +593,9 @@ static int pl2303_carrier_raised(struct usb_serial_port *port)
593 return 0; 593 return 0;
594} 594}
595 595
596static int wait_modem_info(struct usb_serial_port *port, unsigned int arg) 596static int pl2303_tiocmiwait(struct tty_struct *tty, unsigned long arg)
597{ 597{
598 struct usb_serial_port *port = tty->driver_data;
598 struct pl2303_private *priv = usb_get_serial_port_data(port); 599 struct pl2303_private *priv = usb_get_serial_port_data(port);
599 unsigned long flags; 600 unsigned long flags;
600 unsigned int prevstatus; 601 unsigned int prevstatus;
@@ -652,10 +653,6 @@ static int pl2303_ioctl(struct tty_struct *tty,
652 return -EFAULT; 653 return -EFAULT;
653 654
654 return 0; 655 return 0;
655
656 case TIOCMIWAIT:
657 dev_dbg(&port->dev, "%s TIOCMIWAIT\n", __func__);
658 return wait_modem_info(port, arg);
659 default: 656 default:
660 dev_dbg(&port->dev, "%s not supported = 0x%04x\n", __func__, cmd); 657 dev_dbg(&port->dev, "%s not supported = 0x%04x\n", __func__, cmd);
661 break; 658 break;
@@ -836,6 +833,7 @@ static struct usb_serial_driver pl2303_device = {
836 .set_termios = pl2303_set_termios, 833 .set_termios = pl2303_set_termios,
837 .tiocmget = pl2303_tiocmget, 834 .tiocmget = pl2303_tiocmget,
838 .tiocmset = pl2303_tiocmset, 835 .tiocmset = pl2303_tiocmset,
836 .tiocmiwait = pl2303_tiocmiwait,
839 .process_read_urb = pl2303_process_read_urb, 837 .process_read_urb = pl2303_process_read_urb,
840 .read_int_callback = pl2303_read_int_callback, 838 .read_int_callback = pl2303_read_int_callback,
841 .attach = pl2303_startup, 839 .attach = pl2303_startup,