diff options
Diffstat (limited to 'drivers/scsi/scsi_sysfs.c')
-rw-r--r-- | drivers/scsi/scsi_sysfs.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c index 7134618f0a1f..93b41100a6d8 100644 --- a/drivers/scsi/scsi_sysfs.c +++ b/drivers/scsi/scsi_sysfs.c | |||
@@ -230,7 +230,7 @@ void scsi_sysfs_unregister(void) | |||
230 | */ | 230 | */ |
231 | #define sdev_show_function(field, format_string) \ | 231 | #define sdev_show_function(field, format_string) \ |
232 | static ssize_t \ | 232 | static ssize_t \ |
233 | sdev_show_##field (struct device *dev, char *buf) \ | 233 | sdev_show_##field (struct device *dev, struct device_attribute *attr, char *buf) \ |
234 | { \ | 234 | { \ |
235 | struct scsi_device *sdev; \ | 235 | struct scsi_device *sdev; \ |
236 | sdev = to_scsi_device(dev); \ | 236 | sdev = to_scsi_device(dev); \ |
@@ -254,7 +254,7 @@ static DEVICE_ATTR(field, S_IRUGO, sdev_show_##field, NULL); | |||
254 | sdev_show_function(field, format_string) \ | 254 | sdev_show_function(field, format_string) \ |
255 | \ | 255 | \ |
256 | static ssize_t \ | 256 | static ssize_t \ |
257 | sdev_store_##field (struct device *dev, const char *buf, size_t count) \ | 257 | sdev_store_##field (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) \ |
258 | { \ | 258 | { \ |
259 | struct scsi_device *sdev; \ | 259 | struct scsi_device *sdev; \ |
260 | sdev = to_scsi_device(dev); \ | 260 | sdev = to_scsi_device(dev); \ |
@@ -274,7 +274,7 @@ static DEVICE_ATTR(field, S_IRUGO | S_IWUSR, sdev_show_##field, sdev_store_##fie | |||
274 | sdev_show_function(field, "%d\n") \ | 274 | sdev_show_function(field, "%d\n") \ |
275 | \ | 275 | \ |
276 | static ssize_t \ | 276 | static ssize_t \ |
277 | sdev_store_##field (struct device *dev, const char *buf, size_t count) \ | 277 | sdev_store_##field (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) \ |
278 | { \ | 278 | { \ |
279 | int ret; \ | 279 | int ret; \ |
280 | struct scsi_device *sdev; \ | 280 | struct scsi_device *sdev; \ |
@@ -317,7 +317,7 @@ sdev_rd_attr (model, "%.16s\n"); | |||
317 | sdev_rd_attr (rev, "%.4s\n"); | 317 | sdev_rd_attr (rev, "%.4s\n"); |
318 | 318 | ||
319 | static ssize_t | 319 | static ssize_t |
320 | sdev_show_timeout (struct device *dev, char *buf) | 320 | sdev_show_timeout (struct device *dev, struct device_attribute *attr, char *buf) |
321 | { | 321 | { |
322 | struct scsi_device *sdev; | 322 | struct scsi_device *sdev; |
323 | sdev = to_scsi_device(dev); | 323 | sdev = to_scsi_device(dev); |
@@ -325,7 +325,7 @@ sdev_show_timeout (struct device *dev, char *buf) | |||
325 | } | 325 | } |
326 | 326 | ||
327 | static ssize_t | 327 | static ssize_t |
328 | sdev_store_timeout (struct device *dev, const char *buf, size_t count) | 328 | sdev_store_timeout (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
329 | { | 329 | { |
330 | struct scsi_device *sdev; | 330 | struct scsi_device *sdev; |
331 | int timeout; | 331 | int timeout; |
@@ -337,14 +337,14 @@ sdev_store_timeout (struct device *dev, const char *buf, size_t count) | |||
337 | static DEVICE_ATTR(timeout, S_IRUGO | S_IWUSR, sdev_show_timeout, sdev_store_timeout); | 337 | static DEVICE_ATTR(timeout, S_IRUGO | S_IWUSR, sdev_show_timeout, sdev_store_timeout); |
338 | 338 | ||
339 | static ssize_t | 339 | static ssize_t |
340 | store_rescan_field (struct device *dev, const char *buf, size_t count) | 340 | store_rescan_field (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
341 | { | 341 | { |
342 | scsi_rescan_device(dev); | 342 | scsi_rescan_device(dev); |
343 | return count; | 343 | return count; |
344 | } | 344 | } |
345 | static DEVICE_ATTR(rescan, S_IWUSR, NULL, store_rescan_field); | 345 | static DEVICE_ATTR(rescan, S_IWUSR, NULL, store_rescan_field); |
346 | 346 | ||
347 | static ssize_t sdev_store_delete(struct device *dev, const char *buf, | 347 | static ssize_t sdev_store_delete(struct device *dev, struct device_attribute *attr, const char *buf, |
348 | size_t count) | 348 | size_t count) |
349 | { | 349 | { |
350 | scsi_remove_device(to_scsi_device(dev)); | 350 | scsi_remove_device(to_scsi_device(dev)); |
@@ -353,7 +353,7 @@ static ssize_t sdev_store_delete(struct device *dev, const char *buf, | |||
353 | static DEVICE_ATTR(delete, S_IWUSR, NULL, sdev_store_delete); | 353 | static DEVICE_ATTR(delete, S_IWUSR, NULL, sdev_store_delete); |
354 | 354 | ||
355 | static ssize_t | 355 | static ssize_t |
356 | store_state_field(struct device *dev, const char *buf, size_t count) | 356 | store_state_field(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
357 | { | 357 | { |
358 | int i; | 358 | int i; |
359 | struct scsi_device *sdev = to_scsi_device(dev); | 359 | struct scsi_device *sdev = to_scsi_device(dev); |
@@ -376,7 +376,7 @@ store_state_field(struct device *dev, const char *buf, size_t count) | |||
376 | } | 376 | } |
377 | 377 | ||
378 | static ssize_t | 378 | static ssize_t |
379 | show_state_field(struct device *dev, char *buf) | 379 | show_state_field(struct device *dev, struct device_attribute *attr, char *buf) |
380 | { | 380 | { |
381 | struct scsi_device *sdev = to_scsi_device(dev); | 381 | struct scsi_device *sdev = to_scsi_device(dev); |
382 | const char *name = scsi_device_state_name(sdev->sdev_state); | 382 | const char *name = scsi_device_state_name(sdev->sdev_state); |
@@ -390,7 +390,7 @@ show_state_field(struct device *dev, char *buf) | |||
390 | static DEVICE_ATTR(state, S_IRUGO | S_IWUSR, show_state_field, store_state_field); | 390 | static DEVICE_ATTR(state, S_IRUGO | S_IWUSR, show_state_field, store_state_field); |
391 | 391 | ||
392 | static ssize_t | 392 | static ssize_t |
393 | show_queue_type_field(struct device *dev, char *buf) | 393 | show_queue_type_field(struct device *dev, struct device_attribute *attr, char *buf) |
394 | { | 394 | { |
395 | struct scsi_device *sdev = to_scsi_device(dev); | 395 | struct scsi_device *sdev = to_scsi_device(dev); |
396 | const char *name = "none"; | 396 | const char *name = "none"; |
@@ -406,7 +406,7 @@ show_queue_type_field(struct device *dev, char *buf) | |||
406 | static DEVICE_ATTR(queue_type, S_IRUGO, show_queue_type_field, NULL); | 406 | static DEVICE_ATTR(queue_type, S_IRUGO, show_queue_type_field, NULL); |
407 | 407 | ||
408 | static ssize_t | 408 | static ssize_t |
409 | show_iostat_counterbits(struct device *dev, char *buf) | 409 | show_iostat_counterbits(struct device *dev, struct device_attribute *attr, char *buf) |
410 | { | 410 | { |
411 | return snprintf(buf, 20, "%d\n", (int)sizeof(atomic_t) * 8); | 411 | return snprintf(buf, 20, "%d\n", (int)sizeof(atomic_t) * 8); |
412 | } | 412 | } |
@@ -415,7 +415,7 @@ static DEVICE_ATTR(iocounterbits, S_IRUGO, show_iostat_counterbits, NULL); | |||
415 | 415 | ||
416 | #define show_sdev_iostat(field) \ | 416 | #define show_sdev_iostat(field) \ |
417 | static ssize_t \ | 417 | static ssize_t \ |
418 | show_iostat_##field(struct device *dev, char *buf) \ | 418 | show_iostat_##field(struct device *dev, struct device_attribute *attr, char *buf) \ |
419 | { \ | 419 | { \ |
420 | struct scsi_device *sdev = to_scsi_device(dev); \ | 420 | struct scsi_device *sdev = to_scsi_device(dev); \ |
421 | unsigned long long count = atomic_read(&sdev->field); \ | 421 | unsigned long long count = atomic_read(&sdev->field); \ |
@@ -449,7 +449,7 @@ static struct device_attribute *scsi_sysfs_sdev_attrs[] = { | |||
449 | NULL | 449 | NULL |
450 | }; | 450 | }; |
451 | 451 | ||
452 | static ssize_t sdev_store_queue_depth_rw(struct device *dev, const char *buf, | 452 | static ssize_t sdev_store_queue_depth_rw(struct device *dev, struct device_attribute *attr, const char *buf, |
453 | size_t count) | 453 | size_t count) |
454 | { | 454 | { |
455 | int depth, retval; | 455 | int depth, retval; |
@@ -475,7 +475,7 @@ static struct device_attribute sdev_attr_queue_depth_rw = | |||
475 | __ATTR(queue_depth, S_IRUGO | S_IWUSR, sdev_show_queue_depth, | 475 | __ATTR(queue_depth, S_IRUGO | S_IWUSR, sdev_show_queue_depth, |
476 | sdev_store_queue_depth_rw); | 476 | sdev_store_queue_depth_rw); |
477 | 477 | ||
478 | static ssize_t sdev_store_queue_type_rw(struct device *dev, const char *buf, | 478 | static ssize_t sdev_store_queue_type_rw(struct device *dev, struct device_attribute *attr, const char *buf, |
479 | size_t count) | 479 | size_t count) |
480 | { | 480 | { |
481 | struct scsi_device *sdev = to_scsi_device(dev); | 481 | struct scsi_device *sdev = to_scsi_device(dev); |