mxser: introduce mxser_must_select_bank and use it
authorJiri Slaby <jslaby@suse.cz>
Fri, 18 Jun 2021 06:14:47 +0000 (08:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jun 2021 11:10:01 +0000 (13:10 +0200)
commitb286484b3bb1d01dfd6095f01c8ad04b78f1a625
tree30dc43baae6e7e530c9e95e4a6edbe8fccbd0643
parentedb7d27cd10382b6fdb3af50873a04f108c4ee64
mxser: introduce mxser_must_select_bank and use it

Again, selecting a bank in the EFR register is duplicated many times.
Extract it to a separate function (mxser_must_select_bank) and use it on
all the places.

This cleans up most of the helpers. And mxser_get_must_hardware_id now
returns the HW ID directly, not via a by-reference parameter.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20210618061516.662-42-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/mxser.c