aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ch.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/ch.c')
-rw-r--r--drivers/scsi/ch.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/scsi/ch.c b/drivers/scsi/ch.c
index 75c84d7b9ce8..c4b938bc30d3 100644
--- a/drivers/scsi/ch.c
+++ b/drivers/scsi/ch.c
@@ -910,9 +910,9 @@ static int ch_probe(struct device *dev)
910 ch->minor = minor; 910 ch->minor = minor;
911 sprintf(ch->name,"ch%d",ch->minor); 911 sprintf(ch->name,"ch%d",ch->minor);
912 912
913 class_dev = device_create(ch_sysfs_class, dev, 913 class_dev = device_create_drvdata(ch_sysfs_class, dev,
914 MKDEV(SCSI_CHANGER_MAJOR,ch->minor), 914 MKDEV(SCSI_CHANGER_MAJOR, ch->minor),
915 "s%s", ch->name); 915 ch, "s%s", ch->name);
916 if (IS_ERR(class_dev)) { 916 if (IS_ERR(class_dev)) {
917 printk(KERN_WARNING "ch%d: device_create failed\n", 917 printk(KERN_WARNING "ch%d: device_create failed\n",
918 ch->minor); 918 ch->minor);
@@ -926,7 +926,6 @@ static int ch_probe(struct device *dev)
926 if (init) 926 if (init)
927 ch_init_elem(ch); 927 ch_init_elem(ch);
928 928
929 dev_set_drvdata(dev, ch);
930 sdev_printk(KERN_INFO, sd, "Attached scsi changer %s\n", ch->name); 929 sdev_printk(KERN_INFO, sd, "Attached scsi changer %s\n", ch->name);
931 930
932 return 0; 931 return 0;