diff options
Diffstat (limited to 'drivers/char/vc_screen.c')
| -rw-r--r-- | drivers/char/vc_screen.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/char/vc_screen.c b/drivers/char/vc_screen.c index 7abe405b8657..79c2928a8817 100644 --- a/drivers/char/vc_screen.c +++ b/drivers/char/vc_screen.c | |||
| @@ -474,7 +474,7 @@ static struct file_operations vcs_fops = { | |||
| 474 | .open = vcs_open, | 474 | .open = vcs_open, |
| 475 | }; | 475 | }; |
| 476 | 476 | ||
| 477 | static struct class_simple *vc_class; | 477 | static struct class *vc_class; |
| 478 | 478 | ||
| 479 | void vcs_make_devfs(struct tty_struct *tty) | 479 | void vcs_make_devfs(struct tty_struct *tty) |
| 480 | { | 480 | { |
| @@ -484,26 +484,26 @@ void vcs_make_devfs(struct tty_struct *tty) | |||
| 484 | devfs_mk_cdev(MKDEV(VCS_MAJOR, tty->index + 129), | 484 | devfs_mk_cdev(MKDEV(VCS_MAJOR, tty->index + 129), |
| 485 | S_IFCHR|S_IRUSR|S_IWUSR, | 485 | S_IFCHR|S_IRUSR|S_IWUSR, |
| 486 | "vcc/a%u", tty->index + 1); | 486 | "vcc/a%u", tty->index + 1); |
| 487 | class_simple_device_add(vc_class, MKDEV(VCS_MAJOR, tty->index + 1), NULL, "vcs%u", tty->index + 1); | 487 | class_device_create(vc_class, MKDEV(VCS_MAJOR, tty->index + 1), NULL, "vcs%u", tty->index + 1); |
| 488 | class_simple_device_add(vc_class, MKDEV(VCS_MAJOR, tty->index + 129), NULL, "vcsa%u", tty->index + 1); | 488 | class_device_create(vc_class, MKDEV(VCS_MAJOR, tty->index + 129), NULL, "vcsa%u", tty->index + 1); |
| 489 | } | 489 | } |
| 490 | void vcs_remove_devfs(struct tty_struct *tty) | 490 | void vcs_remove_devfs(struct tty_struct *tty) |
| 491 | { | 491 | { |
| 492 | devfs_remove("vcc/%u", tty->index + 1); | 492 | devfs_remove("vcc/%u", tty->index + 1); |
| 493 | devfs_remove("vcc/a%u", tty->index + 1); | 493 | devfs_remove("vcc/a%u", tty->index + 1); |
| 494 | class_simple_device_remove(MKDEV(VCS_MAJOR, tty->index + 1)); | 494 | class_device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 1)); |
| 495 | class_simple_device_remove(MKDEV(VCS_MAJOR, tty->index + 129)); | 495 | class_device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 129)); |
| 496 | } | 496 | } |
| 497 | 497 | ||
| 498 | int __init vcs_init(void) | 498 | int __init vcs_init(void) |
| 499 | { | 499 | { |
| 500 | if (register_chrdev(VCS_MAJOR, "vcs", &vcs_fops)) | 500 | if (register_chrdev(VCS_MAJOR, "vcs", &vcs_fops)) |
| 501 | panic("unable to get major %d for vcs device", VCS_MAJOR); | 501 | panic("unable to get major %d for vcs device", VCS_MAJOR); |
| 502 | vc_class = class_simple_create(THIS_MODULE, "vc"); | 502 | vc_class = class_create(THIS_MODULE, "vc"); |
| 503 | 503 | ||
| 504 | devfs_mk_cdev(MKDEV(VCS_MAJOR, 0), S_IFCHR|S_IRUSR|S_IWUSR, "vcc/0"); | 504 | devfs_mk_cdev(MKDEV(VCS_MAJOR, 0), S_IFCHR|S_IRUSR|S_IWUSR, "vcc/0"); |
| 505 | devfs_mk_cdev(MKDEV(VCS_MAJOR, 128), S_IFCHR|S_IRUSR|S_IWUSR, "vcc/a0"); | 505 | devfs_mk_cdev(MKDEV(VCS_MAJOR, 128), S_IFCHR|S_IRUSR|S_IWUSR, "vcc/a0"); |
| 506 | class_simple_device_add(vc_class, MKDEV(VCS_MAJOR, 0), NULL, "vcs"); | 506 | class_device_create(vc_class, MKDEV(VCS_MAJOR, 0), NULL, "vcs"); |
| 507 | class_simple_device_add(vc_class, MKDEV(VCS_MAJOR, 128), NULL, "vcsa"); | 507 | class_device_create(vc_class, MKDEV(VCS_MAJOR, 128), NULL, "vcsa"); |
| 508 | return 0; | 508 | return 0; |
| 509 | } | 509 | } |
