mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
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:
parent
303e8ebf5d
commit
0f29b503bd
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user