diff options
author | Jonathan Corbet <corbet@lwn.net> | 2008-07-14 17:29:34 -0400 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2008-07-14 17:29:34 -0400 |
commit | 2fceef397f9880b212a74c418290ce69e7ac00eb (patch) | |
tree | d9cc09ab992825ef7fede4a688103503e3caf655 /drivers/scsi/sg.c | |
parent | feae1ef116ed381625d3731c5ae4f4ebcb3fa302 (diff) | |
parent | bce7f793daec3e65ec5c5705d2457b81fe7b5725 (diff) |
Merge commit 'v2.6.26' into bkl-removal
Diffstat (limited to 'drivers/scsi/sg.c')
-rw-r--r-- | drivers/scsi/sg.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 4284625ed035..cee1e4c6d83c 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c | |||
@@ -1451,17 +1451,18 @@ sg_add(struct device *cl_dev, struct class_interface *cl_intf) | |||
1451 | if (sg_sysfs_valid) { | 1451 | if (sg_sysfs_valid) { |
1452 | struct device *sg_class_member; | 1452 | struct device *sg_class_member; |
1453 | 1453 | ||
1454 | sg_class_member = device_create(sg_sysfs_class, cl_dev->parent, | 1454 | sg_class_member = device_create_drvdata(sg_sysfs_class, |
1455 | MKDEV(SCSI_GENERIC_MAJOR, | 1455 | cl_dev->parent, |
1456 | sdp->index), | 1456 | MKDEV(SCSI_GENERIC_MAJOR, |
1457 | "%s", disk->disk_name); | 1457 | sdp->index), |
1458 | sdp, | ||
1459 | "%s", disk->disk_name); | ||
1458 | if (IS_ERR(sg_class_member)) { | 1460 | if (IS_ERR(sg_class_member)) { |
1459 | printk(KERN_ERR "sg_add: " | 1461 | printk(KERN_ERR "sg_add: " |
1460 | "device_create failed\n"); | 1462 | "device_create failed\n"); |
1461 | error = PTR_ERR(sg_class_member); | 1463 | error = PTR_ERR(sg_class_member); |
1462 | goto cdev_add_err; | 1464 | goto cdev_add_err; |
1463 | } | 1465 | } |
1464 | dev_set_drvdata(sg_class_member, sdp); | ||
1465 | error = sysfs_create_link(&scsidp->sdev_gendev.kobj, | 1466 | error = sysfs_create_link(&scsidp->sdev_gendev.kobj, |
1466 | &sg_class_member->kobj, "generic"); | 1467 | &sg_class_member->kobj, "generic"); |
1467 | if (error) | 1468 | if (error) |