From ee959b00c335d7780136c5abda37809191fe52c3 Mon Sep 17 00:00:00 2001 From: Tony Jones Date: Fri, 22 Feb 2008 00:13:36 +0100 Subject: 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 Signed-off-by: Kay Sievers Cc: Roland Dreier Cc: Sean Hefty Cc: Hal Rosenstock Cc: James Bottomley Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/hptiop.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'drivers/scsi/hptiop.c') 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, 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 -- cgit v1.2.3