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>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
56d110e852
commit
ee959b00c3
@@ -859,14 +859,16 @@ static int hptiop_adjust_disk_queue_depth(struct scsi_device *sdev,
|
||||
return queue_depth;
|
||||
}
|
||||
|
||||
static ssize_t hptiop_show_version(struct class_device *class_dev, char *buf)
|
||||
static ssize_t hptiop_show_version(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
return snprintf(buf, PAGE_SIZE, "%s\n", driver_ver);
|
||||
}
|
||||
|
||||
static ssize_t hptiop_show_fw_version(struct class_device *class_dev, char *buf)
|
||||
static ssize_t hptiop_show_fw_version(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
struct Scsi_Host *host = class_to_shost(class_dev);
|
||||
struct Scsi_Host *host = class_to_shost(dev);
|
||||
struct hptiop_hba *hba = (struct hptiop_hba *)host->hostdata;
|
||||
|
||||
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)
|
||||
hba->firmware_version & 0xff);
|
||||
}
|
||||
|
||||
static struct class_device_attribute hptiop_attr_version = {
|
||||
static struct device_attribute hptiop_attr_version = {
|
||||
.attr = {
|
||||
.name = "driver-version",
|
||||
.mode = S_IRUGO,
|
||||
@@ -884,7 +886,7 @@ static struct class_device_attribute hptiop_attr_version = {
|
||||
.show = hptiop_show_version,
|
||||
};
|
||||
|
||||
static struct class_device_attribute hptiop_attr_fw_version = {
|
||||
static struct device_attribute hptiop_attr_fw_version = {
|
||||
.attr = {
|
||||
.name = "firmware-version",
|
||||
.mode = S_IRUGO,
|
||||
@@ -892,7 +894,7 @@ static struct class_device_attribute hptiop_attr_fw_version = {
|
||||
.show = hptiop_show_fw_version,
|
||||
};
|
||||
|
||||
static struct class_device_attribute *hptiop_attrs[] = {
|
||||
static struct device_attribute *hptiop_attrs[] = {
|
||||
&hptiop_attr_version,
|
||||
&hptiop_attr_fw_version,
|
||||
NULL
|
||||
|
Reference in New Issue
Block a user