serial: 8250_aspeed_vuart: refactor sirq and lpc address setting code
authorZev Weiss <zev@bewilderbeest.net>
Mon, 12 Apr 2021 03:47:10 +0000 (22:47 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Apr 2021 08:18:35 +0000 (10:18 +0200)
commit3b44af4f9f4d9aab7d369b06e7c53db274927582
tree9f5bb27a9f2737c20a81bdea2b69020eb95f174a
parenta13df3bec5963dc8f0f49257ae4f83c1445acaff
serial: 8250_aspeed_vuart: refactor sirq and lpc address setting code

This splits dedicated aspeed_vuart_set_{sirq,lpc_address}() functions
out of the sysfs store functions in preparation for adding DT
properties that will be poking the same registers.  While we're at it,
these functions now provide some basic bounds-checking on their
arguments.

Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Link: https://lore.kernel.org/r/20210412034712.16778-3-zev@bewilderbeest.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_aspeed_vuart.c