Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1444205
| From | Johan Hovold <johan@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 17/36] usb: serial: ti_usb_3410_5052: Remove useless tty_wakeup |
| Date | 2016-07-15 13:40 +0200 |
| Message-ID | <rV9Dk-6kq-11@gated-at.bofh.it> (permalink) |
| References | <rxUDo-21y-3@gated-at.bofh.it> <rxUDp-21y-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, May 12, 2016 at 10:48:49AM +0200, Mathieu OTHACEHE wrote:
> The generic driver doesn't call tty_wakeup in
> usb_serial_generic_msr_changed so this tty_wakeup seems useless.
While we strive to have the generic implementation as complete as
possible, it not doing something does not mean it must not be done. :)
> Signed-off-by: Mathieu OTHACEHE <m.othacehe@gmail.com>
> ---
> drivers/usb/serial/ti_usb_3410_5052.c | 9 ---------
> 1 file changed, 9 deletions(-)
>
> diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c
> index 5ef721c..3f2372e 100644
> --- a/drivers/usb/serial/ti_usb_3410_5052.c
> +++ b/drivers/usb/serial/ti_usb_3410_5052.c
> @@ -1238,7 +1238,6 @@ static int ti_set_serial_info(struct tty_struct *tty, struct ti_port *tport,
> static void ti_handle_new_msr(struct ti_port *tport, u8 msr)
> {
> struct async_icount *icount;
> - struct tty_struct *tty;
> unsigned long flags;
>
> dev_dbg(&tport->tp_port->dev, "%s - msr 0x%02X\n", __func__, msr);
> @@ -1259,14 +1258,6 @@ static void ti_handle_new_msr(struct ti_port *tport, u8 msr)
> }
>
> tport->tp_msr = msr & TI_MSR_MASK;
> -
> - /* handle CTS flow control */
> - tty = tty_port_tty_get(&tport->tp_port->port);
> - if (tty && C_CRTSCTS(tty)) {
> - if (msr & TI_MSR_CTS)
> - tty_wakeup(tty);
> - }
> - tty_kref_put(tty);
That said, this particular change does seem correct, as any writers
would have been woken up once any blocked (nacked) bulk-out transfers
complete.
Thanks,
Johan
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH 17/36] usb: serial: ti_usb_3410_5052: Remove useless tty_wakeup Johan Hovold <johan@kernel.org> - 2016-07-15 13:40 +0200
csiph-web