提交 143d9d96 编写于 作者: J Johan Hovold 提交者: Greg Kroah-Hartman

USB: serial: add tiocmiwait subdriver operation

Add tiocmiwait operation to struct usb_serial_driver.
Signed-off-by: NJohan Hovold <jhovold@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 5cb27dde
......@@ -402,10 +402,17 @@ static int serial_ioctl(struct tty_struct *tty,
dev_dbg(tty->dev, "%s - cmd 0x%.4x\n", __func__, cmd);
if (port->serial->type->ioctl)
retval = port->serial->type->ioctl(tty, cmd, arg);
else
retval = -ENOIOCTLCMD;
switch (cmd) {
case TIOCMIWAIT:
if (port->serial->type->tiocmiwait)
retval = port->serial->type->tiocmiwait(tty, arg);
break;
default:
if (port->serial->type->ioctl)
retval = port->serial->type->ioctl(tty, cmd, arg);
else
retval = -ENOIOCTLCMD;
}
return retval;
}
......
......@@ -272,6 +272,7 @@ struct usb_serial_driver {
int (*tiocmget)(struct tty_struct *tty);
int (*tiocmset)(struct tty_struct *tty,
unsigned int set, unsigned int clear);
int (*tiocmiwait)(struct tty_struct *tty, unsigned long arg);
int (*get_icount)(struct tty_struct *tty,
struct serial_icounter_struct *icount);
/* Called by the tty layer for port level work. There may or may not
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册