aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ch.c
diff options
context:
space:
mode:
authorTony Jones <tonyj@suse.de>2008-02-21 18:13:36 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-04-19 22:10:33 -0400
commitee959b00c335d7780136c5abda37809191fe52c3 (patch)
tree7775f3b274fd8caf5e7e5154fea89e96f2babd94 /drivers/scsi/ch.c
parent56d110e852b0b1c85ad6c9bfe1cb4473ceb16402 (diff)
SCSI: convert struct class_device to struct device
It's big, but there doesn't seem to be a way to split it up smaller... Signed-off-by: Tony Jones <tonyj@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Cc: Roland Dreier <rolandd@cisco.com> Cc: Sean Hefty <sean.hefty@intel.com> Cc: Hal Rosenstock <hal.rosenstock@gmail.com> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/scsi/ch.c')
-rw-r--r--drivers/scsi/ch.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/scsi/ch.c b/drivers/scsi/ch.c
index 92d1cb1b21cb..75c84d7b9ce8 100644
--- a/drivers/scsi/ch.c
+++ b/drivers/scsi/ch.c
@@ -881,7 +881,7 @@ static long ch_ioctl_compat(struct file * file,
881static int ch_probe(struct device *dev) 881static int ch_probe(struct device *dev)
882{ 882{
883 struct scsi_device *sd = to_scsi_device(dev); 883 struct scsi_device *sd = to_scsi_device(dev);
884 struct class_device *class_dev; 884 struct device *class_dev;
885 int minor, ret = -ENOMEM; 885 int minor, ret = -ENOMEM;
886 scsi_changer *ch; 886 scsi_changer *ch;
887 887
@@ -910,11 +910,11 @@ 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 = class_device_create(ch_sysfs_class, NULL, 913 class_dev = device_create(ch_sysfs_class, dev,
914 MKDEV(SCSI_CHANGER_MAJOR, ch->minor), 914 MKDEV(SCSI_CHANGER_MAJOR,ch->minor),
915 dev, "s%s", ch->name); 915 "s%s", ch->name);
916 if (IS_ERR(class_dev)) { 916 if (IS_ERR(class_dev)) {
917 printk(KERN_WARNING "ch%d: class_device_create failed\n", 917 printk(KERN_WARNING "ch%d: device_create failed\n",
918 ch->minor); 918 ch->minor);
919 ret = PTR_ERR(class_dev); 919 ret = PTR_ERR(class_dev);
920 goto remove_idr; 920 goto remove_idr;
@@ -945,8 +945,7 @@ static int ch_remove(struct device *dev)
945 idr_remove(&ch_index_idr, ch->minor); 945 idr_remove(&ch_index_idr, ch->minor);
946 spin_unlock(&ch_index_lock); 946 spin_unlock(&ch_index_lock);
947 947
948 class_device_destroy(ch_sysfs_class, 948 device_destroy(ch_sysfs_class, MKDEV(SCSI_CHANGER_MAJOR,ch->minor));
949 MKDEV(SCSI_CHANGER_MAJOR,ch->minor));
950 kfree(ch->dt); 949 kfree(ch->dt);
951 kfree(ch); 950 kfree(ch);
952 return 0; 951 return 0;