diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-03-31 04:42:22 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-04-09 14:13:26 -0400 |
commit | 9d4e5c54a3b67cc0246afe0274ba028a85e79a10 (patch) | |
tree | d7dd41f27bff490da310d65a453a946a52d4090a /drivers/scsi/arm/eesox.c | |
parent | 6b3a8bbfd15ca86da496845890a48bee27b423e4 (diff) |
fas216: switch to ->show_info()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/scsi/arm/eesox.c')
-rw-r--r-- | drivers/scsi/arm/eesox.c | 42 |
1 files changed, 9 insertions, 33 deletions
diff --git a/drivers/scsi/arm/eesox.c b/drivers/scsi/arm/eesox.c index 8e36908415ec..5bf3c0d134b4 100644 --- a/drivers/scsi/arm/eesox.c +++ b/drivers/scsi/arm/eesox.c | |||
@@ -422,45 +422,20 @@ eesoxscsi_set_proc_info(struct Scsi_Host *host, char *buffer, int length) | |||
422 | return ret; | 422 | return ret; |
423 | } | 423 | } |
424 | 424 | ||
425 | /* Prototype: int eesoxscsi_proc_info(char *buffer, char **start, off_t offset, | 425 | static int eesoxscsi_show_info(struct seq_file *m, struct Scsi_Host *host) |
426 | * int length, int host_no, int inout) | ||
427 | * Purpose : Return information about the driver to a user process accessing | ||
428 | * the /proc filesystem. | ||
429 | * Params : buffer - a buffer to write information to | ||
430 | * start - a pointer into this buffer set by this routine to the start | ||
431 | * of the required information. | ||
432 | * offset - offset into information that we have read up to. | ||
433 | * length - length of buffer | ||
434 | * host_no - host number to return information for | ||
435 | * inout - 0 for reading, 1 for writing. | ||
436 | * Returns : length of data written to buffer. | ||
437 | */ | ||
438 | int eesoxscsi_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_t offset, | ||
439 | int length, int inout) | ||
440 | { | 426 | { |
441 | struct eesoxscsi_info *info; | 427 | struct eesoxscsi_info *info; |
442 | char *p = buffer; | ||
443 | int pos; | ||
444 | |||
445 | if (inout == 1) | ||
446 | return eesoxscsi_set_proc_info(host, buffer, length); | ||
447 | 428 | ||
448 | info = (struct eesoxscsi_info *)host->hostdata; | 429 | info = (struct eesoxscsi_info *)host->hostdata; |
449 | 430 | ||
450 | p += sprintf(p, "EESOX SCSI driver v%s\n", VERSION); | 431 | seq_printf(m, "EESOX SCSI driver v%s\n", VERSION); |
451 | p += fas216_print_host(&info->info, p); | 432 | fas216_print_host(&info->info, m); |
452 | p += sprintf(p, "Term : o%s\n", | 433 | seq_printf(m, "Term : o%s\n", |
453 | info->control & EESOX_TERM_ENABLE ? "n" : "ff"); | 434 | info->control & EESOX_TERM_ENABLE ? "n" : "ff"); |
454 | 435 | ||
455 | p += fas216_print_stats(&info->info, p); | 436 | fas216_print_stats(&info->info, m); |
456 | p += fas216_print_devices(&info->info, p); | 437 | fas216_print_devices(&info->info, m); |
457 | 438 | return 0; | |
458 | *start = buffer + offset; | ||
459 | pos = p - buffer - offset; | ||
460 | if (pos > length) | ||
461 | pos = length; | ||
462 | |||
463 | return pos; | ||
464 | } | 439 | } |
465 | 440 | ||
466 | static ssize_t eesoxscsi_show_term(struct device *dev, struct device_attribute *attr, char *buf) | 441 | static ssize_t eesoxscsi_show_term(struct device *dev, struct device_attribute *attr, char *buf) |
@@ -498,7 +473,8 @@ static DEVICE_ATTR(bus_term, S_IRUGO | S_IWUSR, | |||
498 | 473 | ||
499 | static struct scsi_host_template eesox_template = { | 474 | static struct scsi_host_template eesox_template = { |
500 | .module = THIS_MODULE, | 475 | .module = THIS_MODULE, |
501 | .proc_info = eesoxscsi_proc_info, | 476 | .show_info = eesoxscsi_show_info, |
477 | .write_info = eesoxscsi_set_proc_info, | ||
502 | .name = "EESOX SCSI", | 478 | .name = "EESOX SCSI", |
503 | .info = eesoxscsi_info, | 479 | .info = eesoxscsi_info, |
504 | .queuecommand = fas216_queue_command, | 480 | .queuecommand = fas216_queue_command, |