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 <[email protected]> Suggested-by: Thomas Weißschuh <[email protected]> Signed-off-by: Ricardo B. Marliere <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent d2740f7 commit aea2654

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)