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>
This commit is contained in:
Jiri Slaby 2021-05-05 11:19:14 +02:00 committed by Greg Kroah-Hartman
parent 303e8ebf5d
commit 0f29b503bd
1 changed files with 2 additions and 3 deletions

View File

@ -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);
}
/*