summaryrefslogtreecommitdiff
path: root/include/linux/tty.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-04-02 20:58:50 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-04-03 22:43:07 +0300
commit862d8312eed994a8a9af7aa8e9e15456183b10a7 (patch)
tree5f5539fe15f5f1009b9d6086f0adcecb6b6df478 /include/linux/tty.h
parent2243acd50ac4026e93ac4f024109be6dbd7f9098 (diff)
downloadlinux-862d8312eed994a8a9af7aa8e9e15456183b10a7.tar.xz
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>
Diffstat (limited to 'include/linux/tty.h')
-rw-r--r--include/linux/tty.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 093935e97f42..121eb4b0d325 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -387,7 +387,7 @@ extern struct ktermios tty_std_termios;
int vcs_init(void);
-extern struct class *tty_class;
+extern const struct class tty_class;
/**
* tty_kref_get - get a tty reference