aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/vc_screen.c
diff options
context:
space:
mode:
authorgregkh@suse.de <gregkh@suse.de>2005-03-23 12:53:09 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-20 18:15:08 -0400
commitca8eca6884861c1ce294b05aacfdf9045bba9aff (patch)
treed155207bb52a56683160aa192765a19d67161c01 /drivers/char/vc_screen.c
parentdeb3697037a7d362d13468a73643e09cbc1615a8 (diff)
[PATCH] class: convert drivers/char/* to use the new class api instead of class_simple
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/char/vc_screen.c')
-rw-r--r--drivers/char/vc_screen.c16
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
477static struct class_simple *vc_class; 477static struct class *vc_class;
478 478
479void vcs_make_devfs(struct tty_struct *tty) 479void 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}
490void vcs_remove_devfs(struct tty_struct *tty) 490void 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
498int __init vcs_init(void) 498int __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}