aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-scsi.c
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/libata-scsi.c
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/libata-scsi.c')
-rw-r--r--drivers/ata/libata-scsi.c15
1 files changed, 8 insertions, 7 deletions
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 *))