diff options
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 e5881e92d0f..3b9514c8f1f 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 | ||