diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2006-08-08 01:19:37 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-12-01 17:51:59 -0500 |
commit | cd15422b9f39155e2d9ea56ae95c6f62aa5df42e (patch) | |
tree | 70a1417cb85c0b0153bff87403e41a0305620303 /drivers/char/vc_screen.c | |
parent | 805952a889c4d0fdab23307c14c5ce9571f81233 (diff) |
Driver core: convert vc code to use struct device
Converts from using struct "class_device" to "struct device" making
everything show up properly in /sys/devices/ with symlinks from the
/sys/class directory.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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 bd7a98c6ea7a..f442b574b44a 100644 --- a/drivers/char/vc_screen.c +++ b/drivers/char/vc_screen.c | |||
@@ -476,16 +476,16 @@ static struct class *vc_class; | |||
476 | 476 | ||
477 | void vcs_make_sysfs(struct tty_struct *tty) | 477 | void vcs_make_sysfs(struct tty_struct *tty) |
478 | { | 478 | { |
479 | class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 1), | 479 | device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 1), |
480 | NULL, "vcs%u", tty->index + 1); | 480 | "vcs%u", tty->index + 1); |
481 | class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 129), | 481 | device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 129), |
482 | NULL, "vcsa%u", tty->index + 1); | 482 | "vcsa%u", tty->index + 1); |
483 | } | 483 | } |
484 | 484 | ||
485 | void vcs_remove_sysfs(struct tty_struct *tty) | 485 | void vcs_remove_sysfs(struct tty_struct *tty) |
486 | { | 486 | { |
487 | class_device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 1)); | 487 | device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 1)); |
488 | class_device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 129)); | 488 | device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 129)); |
489 | } | 489 | } |
490 | 490 | ||
491 | int __init vcs_init(void) | 491 | int __init vcs_init(void) |
@@ -494,7 +494,7 @@ int __init vcs_init(void) | |||
494 | panic("unable to get major %d for vcs device", VCS_MAJOR); | 494 | panic("unable to get major %d for vcs device", VCS_MAJOR); |
495 | vc_class = class_create(THIS_MODULE, "vc"); | 495 | vc_class = class_create(THIS_MODULE, "vc"); |
496 | 496 | ||
497 | class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 0), NULL, "vcs"); | 497 | device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 0), "vcs"); |
498 | class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 128), NULL, "vcsa"); | 498 | device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 128), "vcsa"); |
499 | return 0; | 499 | return 0; |
500 | } | 500 | } |