aboutsummaryrefslogtreecommitdiffstats
path: root/block/bsg.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2008-05-21 15:52:33 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-07-22 00:54:41 -0400
commitf79f060561d04a38d41e773ade9baafce3c96179 (patch)
tree42c8510983db05ba8a68626732940cfa73d6b60f /block/bsg.c
parent09857e35cdccf2457bb03c6d7595adc210a517cc (diff)
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,
1044 bcd->release = release; 1044 bcd->release = release;
1045 kref_init(&bcd->ref); 1045 kref_init(&bcd->ref);
1046 dev = MKDEV(bsg_major, bcd->minor); 1046 dev = MKDEV(bsg_major, bcd->minor);
1047 class_dev = device_create(bsg_class, parent, dev, "%s", devname); 1047 class_dev = device_create_drvdata(bsg_class, parent, dev, NULL,
1048 "%s", devname);
1048 if (IS_ERR(class_dev)) { 1049 if (IS_ERR(class_dev)) {
1049 ret = PTR_ERR(class_dev); 1050 ret = PTR_ERR(class_dev);
1050 goto put_dev; 1051 goto put_dev;