diff options
Diffstat (limited to 'drivers/ata/libata-scsi.c')
-rw-r--r-- | drivers/ata/libata-scsi.c | 15 |
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 | ||
134 | static ssize_t ata_scsi_lpm_put(struct class_device *class_dev, | 134 | static 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 | ||
164 | static ssize_t | 165 | static ssize_t |
165 | ata_scsi_lpm_show(struct class_device *class_dev, char *buf) | 166 | ata_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 | } |
177 | CLASS_DEVICE_ATTR(link_power_management_policy, S_IRUGO | S_IWUSR, | 178 | DEVICE_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); |
179 | EXPORT_SYMBOL_GPL(class_device_attr_link_power_management_policy); | 180 | EXPORT_SYMBOL_GPL(dev_attr_link_power_management_policy); |
180 | 181 | ||
181 | static void ata_scsi_invalid_field(struct scsi_cmnd *cmd, | 182 | static void ata_scsi_invalid_field(struct scsi_cmnd *cmd, |
182 | void (*done)(struct scsi_cmnd *)) | 183 | void (*done)(struct scsi_cmnd *)) |