tty: vt: add new helper for reseting vc parameters
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Fri, 2 Feb 2024 06:56:04 +0000 (07:56 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 6 Feb 2024 14:37:39 +0000 (14:37 +0000)
commit798d8b1cfecc45ede0d32ee1375bae3c39649d7d
tree9cda27a4f253b63ef7046fbdb44ee2f073293c96
parentbc9d077a8d171765b11f3b2fc52ba483bc1a31f6
tty: vt: add new helper for reseting vc parameters

The code to reset the vc parameter parsing is repeated on two locations.
Create a helper vc_reset_params() and use it on both of them.

And instead of a 'for' loop to clear the array of parameters, use
simpler memset().

Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20240202065608.14019-19-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vt/vt.c