diff options
author | Tony Jones <tonyj@suse.de> | 2008-02-21 18:13:36 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-04-19 22:10:33 -0400 |
commit | ee959b00c335d7780136c5abda37809191fe52c3 (patch) | |
tree | 7775f3b274fd8caf5e7e5154fea89e96f2babd94 /drivers/scsi/ibmvscsi/ibmvstgt.c | |
parent | 56d110e852b0b1c85ad6c9bfe1cb4473ceb16402 (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/ibmvscsi/ibmvstgt.c')
-rw-r--r-- | drivers/scsi/ibmvscsi/ibmvstgt.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/drivers/scsi/ibmvscsi/ibmvstgt.c b/drivers/scsi/ibmvscsi/ibmvstgt.c index e5881e92d0fb..3b9514c8f1f1 100644 --- a/drivers/scsi/ibmvscsi/ibmvstgt.c +++ b/drivers/scsi/ibmvscsi/ibmvstgt.c | |||
@@ -780,32 +780,35 @@ static int ibmvstgt_it_nexus_response(struct Scsi_Host *shost, u64 itn_id, | |||
780 | return 0; | 780 | return 0; |
781 | } | 781 | } |
782 | 782 | ||
783 | static ssize_t system_id_show(struct class_device *cdev, char *buf) | 783 | static ssize_t system_id_show(struct device *dev, |
784 | struct device_attribute *attr, char *buf) | ||
784 | { | 785 | { |
785 | return snprintf(buf, PAGE_SIZE, "%s\n", system_id); | 786 | return snprintf(buf, PAGE_SIZE, "%s\n", system_id); |
786 | } | 787 | } |
787 | 788 | ||
788 | static ssize_t partition_number_show(struct class_device *cdev, char *buf) | 789 | static ssize_t partition_number_show(struct device *dev, |
790 | struct device_attribute *attr, char *buf) | ||
789 | { | 791 | { |
790 | return snprintf(buf, PAGE_SIZE, "%x\n", partition_number); | 792 | return snprintf(buf, PAGE_SIZE, "%x\n", partition_number); |
791 | } | 793 | } |
792 | 794 | ||
793 | static ssize_t unit_address_show(struct class_device *cdev, char *buf) | 795 | static ssize_t unit_address_show(struct device *dev, |
796 | struct device_attribute *attr, char *buf) | ||
794 | { | 797 | { |
795 | struct Scsi_Host *shost = class_to_shost(cdev); | 798 | struct Scsi_Host *shost = class_to_shost(dev); |
796 | struct srp_target *target = host_to_srp_target(shost); | 799 | struct srp_target *target = host_to_srp_target(shost); |
797 | struct vio_port *vport = target_to_port(target); | 800 | struct vio_port *vport = target_to_port(target); |
798 | return snprintf(buf, PAGE_SIZE, "%x\n", vport->dma_dev->unit_address); | 801 | return snprintf(buf, PAGE_SIZE, "%x\n", vport->dma_dev->unit_address); |
799 | } | 802 | } |
800 | 803 | ||
801 | static CLASS_DEVICE_ATTR(system_id, S_IRUGO, system_id_show, NULL); | 804 | static DEVICE_ATTR(system_id, S_IRUGO, system_id_show, NULL); |
802 | static CLASS_DEVICE_ATTR(partition_number, S_IRUGO, partition_number_show, NULL); | 805 | static DEVICE_ATTR(partition_number, S_IRUGO, partition_number_show, NULL); |
803 | static CLASS_DEVICE_ATTR(unit_address, S_IRUGO, unit_address_show, NULL); | 806 | static DEVICE_ATTR(unit_address, S_IRUGO, unit_address_show, NULL); |
804 | 807 | ||
805 | static struct class_device_attribute *ibmvstgt_attrs[] = { | 808 | static struct device_attribute *ibmvstgt_attrs[] = { |
806 | &class_device_attr_system_id, | 809 | &dev_attr_system_id, |
807 | &class_device_attr_partition_number, | 810 | &dev_attr_partition_number, |
808 | &class_device_attr_unit_address, | 811 | &dev_attr_unit_address, |
809 | NULL, | 812 | NULL, |
810 | }; | 813 | }; |
811 | 814 | ||