aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorTony Jones <tonyj@suse.de>2008-02-21 18:13:36 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-04-19 22:10:33 -0400
commitee959b00c335d7780136c5abda37809191fe52c3 (patch)
tree7775f3b274fd8caf5e7e5154fea89e96f2babd94 /drivers/ata
parent56d110e852b0b1c85ad6c9bfe1cb4473ceb16402 (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/ata')
-rw-r--r--drivers/ata/ahci.c4
-rw-r--r--drivers/ata/libata-scsi.c15
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);
273static int ahci_pci_device_resume(struct pci_dev *pdev); 273static int ahci_pci_device_resume(struct pci_dev *pdev);
274#endif 274#endif
275 275
276static struct class_device_attribute *ahci_shost_attrs[] = { 276static struct device_attribute *ahci_shost_attrs[] = {
277 &class_device_attr_link_power_management_policy, 277 &dev_attr_link_power_management_policy,
278 NULL 278 NULL
279}; 279};
280 280
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)
131 return NULL; 131 return NULL;
132} 132}
133 133
134static ssize_t ata_scsi_lpm_put(struct class_device *class_dev, 134static ssize_t ata_scsi_lpm_put(struct device *dev,
135 const char *buf, size_t count) 135 struct device_attribute *attr,
136 const char *buf, size_t count)
136{ 137{
137 struct Scsi_Host *shost = class_to_shost(class_dev); 138 struct Scsi_Host *shost = class_to_shost(dev);
138 struct ata_port *ap = ata_shost_to_port(shost); 139 struct ata_port *ap = ata_shost_to_port(shost);
139 enum link_pm policy = 0; 140 enum link_pm policy = 0;
140 int i; 141 int i;
@@ -162,9 +163,9 @@ static ssize_t ata_scsi_lpm_put(struct class_device *class_dev,
162} 163}
163 164
164static ssize_t 165static ssize_t
165ata_scsi_lpm_show(struct class_device *class_dev, char *buf) 166ata_scsi_lpm_show(struct device *dev, struct device_attribute *attr, char *buf)
166{ 167{
167 struct Scsi_Host *shost = class_to_shost(class_dev); 168 struct Scsi_Host *shost = class_to_shost(dev);
168 struct ata_port *ap = ata_shost_to_port(shost); 169 struct ata_port *ap = ata_shost_to_port(shost);
169 const char *policy = 170 const char *policy =
170 ata_scsi_lpm_get(ap->pm_policy); 171 ata_scsi_lpm_get(ap->pm_policy);
@@ -174,9 +175,9 @@ ata_scsi_lpm_show(struct class_device *class_dev, char *buf)
174 175
175 return snprintf(buf, 23, "%s\n", policy); 176 return snprintf(buf, 23, "%s\n", policy);
176} 177}
177CLASS_DEVICE_ATTR(link_power_management_policy, S_IRUGO | S_IWUSR, 178DEVICE_ATTR(link_power_management_policy, S_IRUGO | S_IWUSR,
178 ata_scsi_lpm_show, ata_scsi_lpm_put); 179 ata_scsi_lpm_show, ata_scsi_lpm_put);
179EXPORT_SYMBOL_GPL(class_device_attr_link_power_management_policy); 180EXPORT_SYMBOL_GPL(dev_attr_link_power_management_policy);
180 181
181static void ata_scsi_invalid_field(struct scsi_cmnd *cmd, 182static void ata_scsi_invalid_field(struct scsi_cmnd *cmd,
182 void (*done)(struct scsi_cmnd *)) 183 void (*done)(struct scsi_cmnd *))