diff options
author | Tony Jones <tonyj@suse.de> | 2008-02-22 00:13:36 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-04-19 19:10:33 -0700 |
commit | ee959b00c335d7780136c5abda37809191fe52c3 (patch) | |
tree | 7775f3b274fd8caf5e7e5154fea89e96f2babd94 /drivers/ata | |
parent | 56d110e852b0b1c85ad6c9bfe1cb4473ceb16402 (diff) | |
download | blackbird-op-linux-ee959b00c335d7780136c5abda37809191fe52c3.tar.gz blackbird-op-linux-ee959b00c335d7780136c5abda37809191fe52c3.zip |
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/ata')
-rw-r--r-- | drivers/ata/ahci.c | 4 | ||||
-rw-r--r-- | drivers/ata/libata-scsi.c | 15 |
2 files changed, 10 insertions, 9 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 739ba3f222e8..986e3324e302 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -273,8 +273,8 @@ static int ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg); static int ahci_pci_device_resume(struct pci_dev *pdev); #endif -static struct class_device_attribute *ahci_shost_attrs[] = { - &class_device_attr_link_power_management_policy, +static struct device_attribute *ahci_shost_attrs[] = { + &dev_attr_link_power_management_policy, NULL }; diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index f3c69a8c1103..a34f32442edf 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -131,10 +131,11 @@ static const char *ata_scsi_lpm_get(enum link_pm policy) return NULL; } -static ssize_t ata_scsi_lpm_put(struct class_device *class_dev, - const char *buf, size_t count) +static ssize_t ata_scsi_lpm_put(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) { - struct Scsi_Host *shost = class_to_shost(class_dev); + struct Scsi_Host *shost = class_to_shost(dev); struct ata_port *ap = ata_shost_to_port(shost); enum link_pm policy = 0; int i; @@ -162,9 +163,9 @@ static ssize_t ata_scsi_lpm_put(struct class_device *class_dev, } static ssize_t -ata_scsi_lpm_show(struct class_device *class_dev, char *buf) +ata_scsi_lpm_show(struct device *dev, struct device_attribute *attr, char *buf) { - struct Scsi_Host *shost = class_to_shost(class_dev); + struct Scsi_Host *shost = class_to_shost(dev); struct ata_port *ap = ata_shost_to_port(shost); const char *policy = ata_scsi_lpm_get(ap->pm_policy); @@ -174,9 +175,9 @@ ata_scsi_lpm_show(struct class_device *class_dev, char *buf) return snprintf(buf, 23, "%s\n", policy); } -CLASS_DEVICE_ATTR(link_power_management_policy, S_IRUGO | S_IWUSR, +DEVICE_ATTR(link_power_management_policy, S_IRUGO | S_IWUSR, ata_scsi_lpm_show, ata_scsi_lpm_put); -EXPORT_SYMBOL_GPL(class_device_attr_link_power_management_policy); +EXPORT_SYMBOL_GPL(dev_attr_link_power_management_policy); static void ata_scsi_invalid_field(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) |