mirror of
https://github.com/torvalds/linux.git
synced 2024-11-27 14:41:39 +00:00
Driver core: convert ppdev 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>
This commit is contained in:
parent
9a6a2a5e0b
commit
04880edae5
@ -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 = {
|
||||
|
Loading…
Reference in New Issue
Block a user