summaryrefslogtreecommitdiff
path: root/drivers/char/lp.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2008-05-21 23:52:33 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-07-22 08:54:41 +0400
commit47aa5793f78c274d51711f6a621fa6b02d4e6402 (patch)
tree88c45b3a90fc7d7b4210bf5727497294b0a951eb /drivers/char/lp.c
parentf79f060561d04a38d41e773ade9baafce3c96179 (diff)
downloadlinux-47aa5793f78c274d51711f6a621fa6b02d4e6402.tar.xz
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>
Diffstat (limited to 'drivers/char/lp.c')
-rw-r--r--drivers/char/lp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/lp.c b/drivers/char/lp.c
index 71abb4c33aa2..3f2719b9f77b 100644
--- a/drivers/char/lp.c
+++ b/drivers/char/lp.c
@@ -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");