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/hptiop.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/hptiop.c')
-rw-r--r-- | drivers/scsi/hptiop.c | 14 |
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 | ||
862 | static ssize_t hptiop_show_version(struct class_device *class_dev, char *buf) | 862 | static 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 | ||
867 | static ssize_t hptiop_show_fw_version(struct class_device *class_dev, char *buf) | 868 | static 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 | ||
879 | static struct class_device_attribute hptiop_attr_version = { | 881 | static 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 | ||
887 | static struct class_device_attribute hptiop_attr_fw_version = { | 889 | static 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 | ||
895 | static struct class_device_attribute *hptiop_attrs[] = { | 897 | static 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 |