提交 6f86fec9 编写于 作者: J Johan Hovold 提交者: Greg Kroah-Hartman

USB: ftdi_sio: switch to generic get_icount implementation

Switch to the generic get_icount implementation.
Signed-off-by: NJohan Hovold <jhovold@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 f307e5cd
...@@ -917,8 +917,6 @@ static void ftdi_set_termios(struct tty_struct *tty, ...@@ -917,8 +917,6 @@ static void ftdi_set_termios(struct tty_struct *tty,
static int ftdi_tiocmget(struct tty_struct *tty); static int ftdi_tiocmget(struct tty_struct *tty);
static int ftdi_tiocmset(struct tty_struct *tty, static int ftdi_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear); unsigned int set, unsigned int clear);
static int ftdi_get_icount(struct tty_struct *tty,
struct serial_icounter_struct *icount);
static int ftdi_ioctl(struct tty_struct *tty, static int ftdi_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg); unsigned int cmd, unsigned long arg);
static void ftdi_break_ctl(struct tty_struct *tty, int break_state); static void ftdi_break_ctl(struct tty_struct *tty, int break_state);
...@@ -955,7 +953,7 @@ static struct usb_serial_driver ftdi_sio_device = { ...@@ -955,7 +953,7 @@ static struct usb_serial_driver ftdi_sio_device = {
.tiocmget = ftdi_tiocmget, .tiocmget = ftdi_tiocmget,
.tiocmset = ftdi_tiocmset, .tiocmset = ftdi_tiocmset,
.tiocmiwait = usb_serial_generic_tiocmiwait, .tiocmiwait = usb_serial_generic_tiocmiwait,
.get_icount = ftdi_get_icount, .get_icount = usb_serial_generic_get_icount,
.ioctl = ftdi_ioctl, .ioctl = ftdi_ioctl,
.set_termios = ftdi_set_termios, .set_termios = ftdi_set_termios,
.break_ctl = ftdi_break_ctl, .break_ctl = ftdi_break_ctl,
...@@ -2351,26 +2349,6 @@ static int ftdi_tiocmset(struct tty_struct *tty, ...@@ -2351,26 +2349,6 @@ static int ftdi_tiocmset(struct tty_struct *tty,
return update_mctrl(port, set, clear); return update_mctrl(port, set, clear);
} }
static int ftdi_get_icount(struct tty_struct *tty,
struct serial_icounter_struct *icount)
{
struct usb_serial_port *port = tty->driver_data;
struct async_icount *ic = &port->icount;
icount->cts = ic->cts;
icount->dsr = ic->dsr;
icount->rng = ic->rng;
icount->dcd = ic->dcd;
icount->tx = ic->tx;
icount->rx = ic->rx;
icount->frame = ic->frame;
icount->parity = ic->parity;
icount->overrun = ic->overrun;
icount->brk = ic->brk;
icount->buf_overrun = ic->buf_overrun;
return 0;
}
static int ftdi_ioctl(struct tty_struct *tty, static int ftdi_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册