aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/st.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/st.c')
-rw-r--r--drivers/scsi/st.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index e93544dd81bf..4684cc716aa4 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -4431,17 +4431,19 @@ static int do_create_class_files(struct scsi_tape *STp, int dev_num, int mode)
4431 snprintf(name, 10, "%s%s%s", rew ? "n" : "", 4431 snprintf(name, 10, "%s%s%s", rew ? "n" : "",
4432 STp->disk->disk_name, st_formats[i]); 4432 STp->disk->disk_name, st_formats[i]);
4433 st_class_member = 4433 st_class_member =
4434 device_create(st_sysfs_class, &STp->device->sdev_gendev, 4434 device_create_drvdata(st_sysfs_class,
4435 MKDEV(SCSI_TAPE_MAJOR, 4435 &STp->device->sdev_gendev,
4436 TAPE_MINOR(dev_num, mode, rew)), 4436 MKDEV(SCSI_TAPE_MAJOR,
4437 "%s", name); 4437 TAPE_MINOR(dev_num,
4438 mode, rew)),
4439 &STp->modes[mode],
4440 "%s", name);
4438 if (IS_ERR(st_class_member)) { 4441 if (IS_ERR(st_class_member)) {
4439 printk(KERN_WARNING "st%d: device_create failed\n", 4442 printk(KERN_WARNING "st%d: device_create failed\n",
4440 dev_num); 4443 dev_num);
4441 error = PTR_ERR(st_class_member); 4444 error = PTR_ERR(st_class_member);
4442 goto out; 4445 goto out;
4443 } 4446 }
4444 dev_set_drvdata(st_class_member, &STp->modes[mode]);
4445 4447
4446 error = device_create_file(st_class_member, 4448 error = device_create_file(st_class_member,
4447 &dev_attr_defined); 4449 &dev_attr_defined);