device create: char: convert device_create to device_create_drvdata
device_create() is race-prone, so use the race-free device_create_drvdata() instead as device_create() is going away. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
@@ -752,8 +752,9 @@ static const struct file_operations pp_fops = {
|
||||
|
||||
static void pp_attach(struct parport *port)
|
||||
{
|
||||
device_create(ppdev_class, port->dev, MKDEV(PP_MAJOR, port->number),
|
||||
"parport%d", port->number);
|
||||
device_create_drvdata(ppdev_class, port->dev,
|
||||
MKDEV(PP_MAJOR, port->number),
|
||||
NULL, "parport%d", port->number);
|
||||
}
|
||||
|
||||
static void pp_detach(struct parport *port)
|
||||
|
Reference in New Issue
Block a user