]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/vc_screen.c
vcs: hook sysfs devices into object lifetime instead of "binding"
[linux-2.6-omap-h63xx.git] / drivers / char / vc_screen.c
index 4f3b3f95fc42b4bb7bcf03a561aa5f69c48a393d..d94d25c12aa87ccacfe12d72ea5e72d4f3f4f93c 100644 (file)
@@ -479,18 +479,18 @@ static const struct file_operations vcs_fops = {
 
 static struct class *vc_class;
 
-void vcs_make_sysfs(struct tty_struct *tty)
+void vcs_make_sysfs(int index)
 {
-       device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 1), NULL,
-                     "vcs%u", tty->index + 1);
-       device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 129), NULL,
-                     "vcsa%u", tty->index + 1);
+       device_create(vc_class, NULL, MKDEV(VCS_MAJOR, index + 1), NULL,
+                     "vcs%u", index + 1);
+       device_create(vc_class, NULL, MKDEV(VCS_MAJOR, index + 129), NULL,
+                     "vcsa%u", index + 1);
 }
 
-void vcs_remove_sysfs(struct tty_struct *tty)
+void vcs_remove_sysfs(int index)
 {
-       device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 1));
-       device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 129));
+       device_destroy(vc_class, MKDEV(VCS_MAJOR, index + 1));
+       device_destroy(vc_class, MKDEV(VCS_MAJOR, index + 129));
 }
 
 int __init vcs_init(void)