tty: serial: unify TX space reads under altera_jtaguart_tx_space()
authorJiri Slaby <jslaby@suse.cz>
Tue, 27 Sep 2022 11:18:18 +0000 (13:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 30 Sep 2022 12:58:45 +0000 (14:58 +0200)
commit523f54ed3be7e23340b1c43921e39fddfe149c09
tree522bb6cb8f5fb3b6069778307a109278ae830565
parented9bf4aea06e36bbb3482e01061c433d703bcaff
tty: serial: unify TX space reads under altera_jtaguart_tx_space()

TX space reads from the control register are performed in various forms
on 4 places in altera_jtaguart. Unify all those and do the read and
masking on a single place.

The new helper altera_jtaguart_tx_space() uses FIELD_GET(), so we can
drop ALTERA_JTAGUART_CONTROL_WSPACE_OFF now.

Cc: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Acked-by: Tobias Klauser <tklauser@distanz.ch>
Link: https://lore.kernel.org/r/20220927111819.18516-3-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/altera_jtaguart.c