summaryrefslogtreecommitdiff
path: root/block
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
commitf79f060561d04a38d41e773ade9baafce3c96179 (patch)
tree42c8510983db05ba8a68626732940cfa73d6b60f /block
parent09857e35cdccf2457bb03c6d7595adc210a517cc (diff)
downloadlinux-f79f060561d04a38d41e773ade9baafce3c96179.tar.xz
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')
-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;