summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2021-05-05 11:19:14 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-13 17:03:20 +0200
commit0f29b503bd0b48ec6f14243f3626ac411c879555 (patch)
tree8fc654749aff1e1b60324fa49f57265785741108
parent303e8ebf5dcb802b016b2802825dbc7928f9a50a (diff)
ti-st: use tty_write_room
Don't access tty->ops->write_room directly, use tty_write_room helper instead. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20210505091928.22010-22-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/misc/ti-st/st_core.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/misc/ti-st/st_core.c b/drivers/misc/ti-st/st_core.c
index 05c015140cad..7f6976a9f508 100644
--- a/drivers/misc/ti-st/st_core.c
+++ b/drivers/misc/ti-st/st_core.c
@@ -52,13 +52,12 @@ static void remove_channel_from_table(struct st_data_s *st_gdata,
*/
int st_get_uart_wr_room(struct st_data_s *st_gdata)
{
- struct tty_struct *tty;
if (unlikely(st_gdata == NULL || st_gdata->tty == NULL)) {
pr_err("tty unavailable to perform write");
return -1;
}
- tty = st_gdata->tty;
- return tty->ops->write_room(tty);
+
+ return tty_write_room(st_gdata->tty);
}
/*