mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-05 22:25:16 +00:00
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>
This commit is contained in:
parent
10ee90743e
commit
94459a975b
2 changed files with 1 additions and 2 deletions
|
@ -812,7 +812,7 @@ static void st_tty_flush_buffer(struct tty_struct *tty)
|
||||||
kfree_skb(st_gdata->tx_skb);
|
kfree_skb(st_gdata->tx_skb);
|
||||||
st_gdata->tx_skb = NULL;
|
st_gdata->tx_skb = NULL;
|
||||||
|
|
||||||
tty->ops->flush_buffer(tty);
|
tty_driver_flush_buffer(tty);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -531,7 +531,6 @@ long st_kim_stop(void *kim_data)
|
||||||
/* Flush any pending characters in the driver and discipline. */
|
/* Flush any pending characters in the driver and discipline. */
|
||||||
tty_ldisc_flush(tty);
|
tty_ldisc_flush(tty);
|
||||||
tty_driver_flush_buffer(tty);
|
tty_driver_flush_buffer(tty);
|
||||||
tty->ops->flush_buffer(tty);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* send uninstall notification to UIM */
|
/* send uninstall notification to UIM */
|
||||||
|
|
Loading…
Add table
Reference in a new issue