Skip to content

Commit aea2654

Browse files
rbmarlieregregkh
authored andcommitted
tty: Make sysctl table const
Since commit 7abc9b5 ("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>
1 parent d2740f7 commit aea2654

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/tty/tty_io.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3618,7 +3618,7 @@ void console_sysfs_notify(void)
36183618
sysfs_notify(&consdev->kobj, NULL, "active");
36193619
}
36203620

3621-
static struct ctl_table tty_table[] = {
3621+
static const struct ctl_table tty_table[] = {
36223622
{
36233623
.procname = "legacy_tiocsti",
36243624
.data = &tty_legacy_tiocsti,

0 commit comments

Comments
 (0)