Commit aea2654c authored by Ricardo B. Marliere's avatar Ricardo B. Marliere Committed by Greg Kroah-Hartman
Browse files

tty: Make sysctl table const



Since commit 7abc9b53 ("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: default avatarThomas Weißschuh <linux@weissschuh.net>
Signed-off-by: default avatarRicardo B. Marliere <rbm@suse.com>
Link: https://lore.kernel.org/r/20241213-sysctl_const-tty-v1-1-2e2bcec77f85@suse.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d2740f7d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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,