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:
@@ -813,7 +813,8 @@ static int lp_register(int nr, struct parport *port)
|
||||
if (reset)
|
||||
lp_reset(nr);
|
||||
|
||||
device_create(lp_class, port->dev, MKDEV(LP_MAJOR, nr), "lp%d", nr);
|
||||
device_create_drvdata(lp_class, port->dev, MKDEV(LP_MAJOR, nr), NULL,
|
||||
"lp%d", nr);
|
||||
|
||||
printk(KERN_INFO "lp%d: using %s (%s).\n", nr, port->name,
|
||||
(port->irq == PARPORT_IRQ_NONE)?"polling":"interrupt-driven");
|
||||
|
Reference in New Issue
Block a user