USB: serial: add tiocmiwait subdriver operation
Add tiocmiwait operation to struct usb_serial_driver. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5cb27dde2e
commit
143d9d9616
2 changed files with 12 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue