int __must_check tty_ldisc_init(struct tty_struct *tty);
 void tty_ldisc_deinit(struct tty_struct *tty);
 
-void tty_sysctl_init(void);
+extern int tty_ldisc_autoload;
 
 /* tty_audit.c */
 #ifdef CONFIG_AUDIT
 
                sysfs_notify(&consdev->kobj, NULL, "active");
 }
 
+static struct ctl_table tty_table[] = {
+       {
+               .procname       = "ldisc_autoload",
+               .data           = &tty_ldisc_autoload,
+               .maxlen         = sizeof(tty_ldisc_autoload),
+               .mode           = 0644,
+               .proc_handler   = proc_dointvec,
+               .extra1         = SYSCTL_ZERO,
+               .extra2         = SYSCTL_ONE,
+       },
+       { }
+};
+
+static struct ctl_table tty_dir_table[] = {
+       {
+               .procname       = "tty",
+               .mode           = 0555,
+               .child          = tty_table,
+       },
+       { }
+};
+
+static struct ctl_table tty_root_table[] = {
+       {
+               .procname       = "dev",
+               .mode           = 0555,
+               .child          = tty_dir_table,
+       },
+       { }
+};
+
 /*
  * Ok, now we can initialize the rest of the tty devices and can count
  * on memory allocations, interrupts etc..
  */
 int __init tty_init(void)
 {
-       tty_sysctl_init();
+       register_sysctl_table(tty_root_table);
        cdev_init(&tty_cdev, &tty_fops);
        if (cdev_add(&tty_cdev, MKDEV(TTYAUX_MAJOR, 0), 1) ||
            register_chrdev_region(MKDEV(TTYAUX_MAJOR, 0), 1, "/dev/tty") < 0)
 #endif
        return 0;
 }
-
 
        raw_spin_unlock_irqrestore(&tty_ldiscs_lock, flags);
 }
 
-static int tty_ldisc_autoload = IS_BUILTIN(CONFIG_LDISC_AUTOLOAD);
+int tty_ldisc_autoload = IS_BUILTIN(CONFIG_LDISC_AUTOLOAD);
 
 /**
  * tty_ldisc_get       -       take a reference to an ldisc
                tty_ldisc_put(tty->ldisc);
        tty->ldisc = NULL;
 }
-
-static struct ctl_table tty_table[] = {
-       {
-               .procname       = "ldisc_autoload",
-               .data           = &tty_ldisc_autoload,
-               .maxlen         = sizeof(tty_ldisc_autoload),
-               .mode           = 0644,
-               .proc_handler   = proc_dointvec,
-               .extra1         = SYSCTL_ZERO,
-               .extra2         = SYSCTL_ONE,
-       },
-       { }
-};
-
-static struct ctl_table tty_dir_table[] = {
-       {
-               .procname       = "tty",
-               .mode           = 0555,
-               .child          = tty_table,
-       },
-       { }
-};
-
-static struct ctl_table tty_root_table[] = {
-       {
-               .procname       = "dev",
-               .mode           = 0555,
-               .child          = tty_dir_table,
-       },
-       { }
-};
-
-void tty_sysctl_init(void)
-{
-       register_sysctl_table(tty_root_table);
-}