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/megaraid/megaraid_mbox.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'drivers/scsi/megaraid') diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c index 9f041929aca5..820f91fb63ba 100644 --- a/drivers/scsi/megaraid/megaraid_mbox.c +++ b/drivers/scsi/megaraid/megaraid_mbox.c @@ -125,7 +125,7 @@ static irqreturn_t megaraid_isr(int, void *); static void megaraid_mbox_dpc(unsigned long); -static ssize_t megaraid_sysfs_show_app_hndl(struct class_device *, char *); +static ssize_t megaraid_sysfs_show_app_hndl(struct device *, struct device_attribute *attr, char *); static ssize_t megaraid_sysfs_show_ldnum(struct device *, struct device_attribute *attr, char *); static int megaraid_cmm_register(adapter_t *); @@ -313,12 +313,12 @@ static struct pci_driver megaraid_pci_driver = { // definitions for the device attributes for exporting logical drive number // for a scsi address (Host, Channel, Id, Lun) -CLASS_DEVICE_ATTR(megaraid_mbox_app_hndl, S_IRUSR, megaraid_sysfs_show_app_hndl, +DEVICE_ATTR(megaraid_mbox_app_hndl, S_IRUSR, megaraid_sysfs_show_app_hndl, NULL); // Host template initializer for megaraid mbox sysfs device attributes -static struct class_device_attribute *megaraid_shost_attrs[] = { - &class_device_attr_megaraid_mbox_app_hndl, +static struct device_attribute *megaraid_shost_attrs[] = { + &dev_attr_megaraid_mbox_app_hndl, NULL, }; @@ -4063,9 +4063,10 @@ megaraid_sysfs_get_ldmap(adapter_t *adapter) * handle, since we do not interface with applications directly. */ static ssize_t -megaraid_sysfs_show_app_hndl(struct class_device *cdev, char *buf) +megaraid_sysfs_show_app_hndl(struct device *dev, struct device_attribute *attr, + char *buf) { - struct Scsi_Host *shost = class_to_shost(cdev); + struct Scsi_Host *shost = class_to_shost(dev); adapter_t *adapter = (adapter_t *)SCSIHOST2ADAP(shost); uint32_t app_hndl; -- cgit v1.2.3