Skip to content

Commit cd15422

Browse files
committed
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>
1 parent 805952a commit cd15422

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

‎drivers/char/vc_screen.c‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -476,16 +476,16 @@ static struct class *vc_class;
476476

477477
void vcs_make_sysfs(struct tty_struct *tty)
478478
{
479-
class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 1),
480-
NULL, "vcs%u", tty->index + 1);
481-
class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 129),
482-
NULL, "vcsa%u", tty->index + 1);
479+
device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 1),
480+
"vcs%u", tty->index + 1);
481+
device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 129),
482+
"vcsa%u", tty->index + 1);
483483
}
484484

485485
void vcs_remove_sysfs(struct tty_struct *tty)
486486
{
487-
class_device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 1));
488-
class_device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 129));
487+
device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 1));
488+
device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 129));
489489
}
490490

491491
int __init vcs_init(void)
@@ -494,7 +494,7 @@ int __init vcs_init(void)
494494
panic("unable to get major %d for vcs device", VCS_MAJOR);
495495
vc_class = class_create(THIS_MODULE, "vc");
496496

497-
class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 0), NULL, "vcs");
498-
class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 128), NULL, "vcsa");
497+
device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 0), "vcs");
498+
device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 128), "vcsa");
499499
return 0;
500500
}

0 commit comments

Comments
 (0)