aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2013-11-29 18:00:35 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-04 23:23:51 -0500
commit94459a975b7d4d70c20df1a32d63825469b8d4cc (patch)
tree4e1aed67fa002283d4aa83f82d25e3d62e07efeb /drivers/misc
parent10ee90743e99fb06a0881a35731263c1845275dd (diff)
drivers/misc/ti-st: Prefer tty_driver_flush_buffer
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>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/ti-st/st_core.c2
-rw-r--r--drivers/misc/ti-st/st_kim.c1
2 files changed, 1 insertions, 2 deletions
diff --git a/drivers/misc/ti-st/st_core.c b/drivers/misc/ti-st/st_core.c
index 8d64b681dd93..3aed525e55b4 100644
--- a/drivers/misc/ti-st/st_core.c
+++ b/drivers/misc/ti-st/st_core.c
@@ -812,7 +812,7 @@ static void st_tty_flush_buffer(struct tty_struct *tty)
812 kfree_skb(st_gdata->tx_skb); 812 kfree_skb(st_gdata->tx_skb);
813 st_gdata->tx_skb = NULL; 813 st_gdata->tx_skb = NULL;
814 814
815 tty->ops->flush_buffer(tty); 815 tty_driver_flush_buffer(tty);
816 return; 816 return;
817} 817}
818 818
diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c
index 96853a09788a..9d3dbb28734b 100644
--- a/drivers/misc/ti-st/st_kim.c
+++ b/drivers/misc/ti-st/st_kim.c
@@ -531,7 +531,6 @@ long st_kim_stop(void *kim_data)
531 /* Flush any pending characters in the driver and discipline. */ 531 /* Flush any pending characters in the driver and discipline. */
532 tty_ldisc_flush(tty); 532 tty_ldisc_flush(tty);
533 tty_driver_flush_buffer(tty); 533 tty_driver_flush_buffer(tty);
534 tty->ops->flush_buffer(tty);
535 } 534 }
536 535
537 /* send uninstall notification to UIM */ 536 /* send uninstall notification to UIM */