drivers/misc/ti-st: Prefer tty_driver_flush_buffer
authorPeter Hurley <peter@hurleysoftware.com>
Fri, 29 Nov 2013 23:00:35 +0000 (18:00 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2013 04:23:51 +0000 (20:23 -0800)
The tty core provides an interface for flushing the driver's
write buffer: tty_driver_flush_buffer(); prefer the provided
interface over open-coded. Open-coding can lead to errors
such as the duplicated call in the st_kim driver.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/ti-st/st_core.c
drivers/misc/ti-st/st_kim.c

index 8d64b68..3aed525 100644 (file)
@@ -812,7 +812,7 @@ static void st_tty_flush_buffer(struct tty_struct *tty)
        kfree_skb(st_gdata->tx_skb);
        st_gdata->tx_skb = NULL;
 
-       tty->ops->flush_buffer(tty);
+       tty_driver_flush_buffer(tty);
        return;
 }
 
index 96853a0..9d3dbb2 100644 (file)
@@ -531,7 +531,6 @@ long st_kim_stop(void *kim_data)
                /* Flush any pending characters in the driver and discipline. */
                tty_ldisc_flush(tty);
                tty_driver_flush_buffer(tty);
-               tty->ops->flush_buffer(tty);
        }
 
        /* send uninstall notification to UIM */