summaryrefslogtreecommitdiffstats
path: root/block/bsg.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 /block/bsg.c
parent09857e35cdccf2457bb03c6d7595adc210a517cc (diff)
downloadblackbird-op-linux-f79f060561d04a38d41e773ade9baafce3c96179.tar.gz
blackbird-op-linux-f79f060561d04a38d41e773ade9baafce3c96179.zip
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 'block/bsg.c')
-rw-r--r--block/bsg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/block/bsg.c b/block/bsg.c
index 5fb9b0bdbe85..5a68b09a69ba 100644
--- a/block/bsg.c
+++ b/block/bsg.c
@@ -1044,7 +1044,8 @@ int bsg_register_queue(struct request_queue *q, struct device *parent,
bcd->release = release;
kref_init(&bcd->ref);
dev = MKDEV(bsg_major, bcd->minor);
- class_dev = device_create(bsg_class, parent, dev, "%s", devname);
+ class_dev = device_create_drvdata(bsg_class, parent, dev, NULL,
+ "%s", devname);
if (IS_ERR(class_dev)) {
ret = PTR_ERR(class_dev);
goto put_dev;
OpenPOWER on IntegriCloud