tty: make tty_class a static const structure
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 2 Apr 2023 17:58:50 +0000 (19:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Apr 2023 19:43:07 +0000 (21:43 +0200)
commit862d8312eed994a8a9af7aa8e9e15456183b10a7
tree5f5539fe15f5f1009b9d6086f0adcecb6b6df478
parent2243acd50ac4026e93ac4f024109be6dbd7f9098
tty: make tty_class a static const structure

Now that the driver core allows for struct class to be in read-only
memory, move the tty_class structure to be declared at build time
placing it into read-only memory, instead of having to be dynamically
allocated at boot time.

Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/2023040250-landowner-unfitted-11f4@gregkh
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/pty.c
drivers/tty/tty_io.c
drivers/tty/vt/vt.c
include/linux/tty.h