summaryrefslogtreecommitdiff
path: root/drivers/tty/tty_io.c
diff options
context:
space:
mode:
authorRicardo B. Marliere <rbm@suse.com>2024-12-13 16:35:05 -0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-12-14 15:40:27 +0100
commitaea2654cce40a6e34e91f3be2a31cd040fdea822 (patch)
tree067c40991f076b08ce5e99badf4daa8e4da498b7 /drivers/tty/tty_io.c
parentd2740f7d878932a4b4aaf69d751baf3825c1b287 (diff)
tty: Make sysctl table const
Since commit 7abc9b53bd51 ("sysctl: allow registration of const struct ctl_table"), the sysctl registration API allows for struct ctl_table to be in read-only memory. Move tty_table to be declared at build time, instead of having to be dynamically allocated at boot time. Cc: Thomas Weißschuh <linux@weissschuh.net> Suggested-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Ricardo B. Marliere <rbm@suse.com> Link: https://lore.kernel.org/r/20241213-sysctl_const-tty-v1-1-2e2bcec77f85@suse.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/tty_io.c')
-rw-r--r--drivers/tty/tty_io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index dcb1769c3625..0e84677712b4 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -3618,7 +3618,7 @@ void console_sysfs_notify(void)
sysfs_notify(&consdev->kobj, NULL, "active");
}
-static struct ctl_table tty_table[] = {
+static const struct ctl_table tty_table[] = {
{
.procname = "legacy_tiocsti",
.data = &tty_legacy_tiocsti,