summaryrefslogtreecommitdiffstats
path: root/drivers/block/paride/pt.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2008-05-21 12:52:33 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2008-07-21 21:54:41 -0700
commitf79f060561d04a38d41e773ade9baafce3c96179 (patch)
tree42c8510983db05ba8a68626732940cfa73d6b60f /drivers/block/paride/pt.c
parent09857e35cdccf2457bb03c6d7595adc210a517cc (diff)
downloadop-kernel-dev-f79f060561d04a38d41e773ade9baafce3c96179.zip
op-kernel-dev-f79f060561d04a38d41e773ade9baafce3c96179.tar.gz
device create: block: 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/block/paride/pt.c')
-rw-r--r--drivers/block/paride/pt.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/block/paride/pt.c b/drivers/block/paride/pt.c
index 5c74c35..673b8b2 100644
--- a/drivers/block/paride/pt.c
+++ b/drivers/block/paride/pt.c
@@ -979,10 +979,12 @@ static int __init pt_init(void)
for (unit = 0; unit < PT_UNITS; unit++)
if (pt[unit].present) {
- device_create(pt_class, NULL, MKDEV(major, unit),
- "pt%d", unit);
- device_create(pt_class, NULL, MKDEV(major, unit + 128),
- "pt%dn", unit);
+ device_create_drvdata(pt_class, NULL,
+ MKDEV(major, unit), NULL,
+ "pt%d", unit);
+ device_create_drvdata(pt_class, NULL,
+ MKDEV(major, unit + 128), NULL,
+ "pt%dn", unit);
}
goto out;
OpenPOWER on IntegriCloud