Skip to content

Commit

Permalink
Driver core: convert ppdev code to use struct device
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Greg Kroah-Hartman committed Dec 1, 2006
1 parent 9a6a2a5 commit 04880ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/char/ppdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -752,13 +752,13 @@ static const struct file_operations pp_fops = {

static void pp_attach(struct parport *port)
{
class_device_create(ppdev_class, NULL, MKDEV(PP_MAJOR, port->number),
NULL, "parport%d", port->number);
device_create(ppdev_class, NULL, MKDEV(PP_MAJOR, port->number),
"parport%d", port->number);
}

static void pp_detach(struct parport *port)
{
class_device_destroy(ppdev_class, MKDEV(PP_MAJOR, port->number));
device_destroy(ppdev_class, MKDEV(PP_MAJOR, port->number));
}

static struct parport_driver pp_driver = {
Expand Down

0 comments on commit 04880ed

Please sign in to comment.