aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/hptiop.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/hptiop.c')
-rw-r--r--drivers/scsi/hptiop.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/scsi/hptiop.c b/drivers/scsi/hptiop.c
index beecda991682..5b7be1e9841c 100644
--- a/drivers/scsi/hptiop.c
+++ b/drivers/scsi/hptiop.c
@@ -859,14 +859,16 @@ static int hptiop_adjust_disk_queue_depth(struct scsi_device *sdev,
859 return queue_depth; 859 return queue_depth;
860} 860}
861 861
862static ssize_t hptiop_show_version(struct class_device *class_dev, char *buf) 862static ssize_t hptiop_show_version(struct device *dev,
863 struct device_attribute *attr, char *buf)
863{ 864{
864 return snprintf(buf, PAGE_SIZE, "%s\n", driver_ver); 865 return snprintf(buf, PAGE_SIZE, "%s\n", driver_ver);
865} 866}
866 867
867static ssize_t hptiop_show_fw_version(struct class_device *class_dev, char *buf) 868static ssize_t hptiop_show_fw_version(struct device *dev,
869 struct device_attribute *attr, char *buf)
868{ 870{
869 struct Scsi_Host *host = class_to_shost(class_dev); 871 struct Scsi_Host *host = class_to_shost(dev);
870 struct hptiop_hba *hba = (struct hptiop_hba *)host->hostdata; 872 struct hptiop_hba *hba = (struct hptiop_hba *)host->hostdata;
871 873
872 return snprintf(buf, PAGE_SIZE, "%d.%d.%d.%d\n", 874 return snprintf(buf, PAGE_SIZE, "%d.%d.%d.%d\n",
@@ -876,7 +878,7 @@ static ssize_t hptiop_show_fw_version(struct class_device *class_dev, char *buf)
876 hba->firmware_version & 0xff); 878 hba->firmware_version & 0xff);
877} 879}
878 880
879static struct class_device_attribute hptiop_attr_version = { 881static struct device_attribute hptiop_attr_version = {
880 .attr = { 882 .attr = {
881 .name = "driver-version", 883 .name = "driver-version",
882 .mode = S_IRUGO, 884 .mode = S_IRUGO,
@@ -884,7 +886,7 @@ static struct class_device_attribute hptiop_attr_version = {
884 .show = hptiop_show_version, 886 .show = hptiop_show_version,
885}; 887};
886 888
887static struct class_device_attribute hptiop_attr_fw_version = { 889static struct device_attribute hptiop_attr_fw_version = {
888 .attr = { 890 .attr = {
889 .name = "firmware-version", 891 .name = "firmware-version",
890 .mode = S_IRUGO, 892 .mode = S_IRUGO,
@@ -892,7 +894,7 @@ static struct class_device_attribute hptiop_attr_fw_version = {
892 .show = hptiop_show_fw_version, 894 .show = hptiop_show_fw_version,
893}; 895};
894 896
895static struct class_device_attribute *hptiop_attrs[] = { 897static struct device_attribute *hptiop_attrs[] = {
896 &hptiop_attr_version, 898 &hptiop_attr_version,
897 &hptiop_attr_fw_version, 899 &hptiop_attr_fw_version,
898 NULL 900 NULL