diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-03-31 10:42:22 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-04-09 20:13:26 +0200 |
commit | 9d4e5c54a3b67cc0246afe0274ba028a85e79a10 (patch) | |
tree | d7dd41f27bff490da310d65a453a946a52d4090a /drivers/scsi/arm/powertec.c | |
parent | aic7xxx: switch to ->show_info() (diff) | |
download | linux-9d4e5c54a3b67cc0246afe0274ba028a85e79a10.tar.xz linux-9d4e5c54a3b67cc0246afe0274ba028a85e79a10.zip |
fas216: switch to ->show_info()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to '')
-rw-r--r-- | drivers/scsi/arm/powertec.c | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/drivers/scsi/arm/powertec.c b/drivers/scsi/arm/powertec.c index 246600b93555..abc9593615e9 100644 --- a/drivers/scsi/arm/powertec.c +++ b/drivers/scsi/arm/powertec.c @@ -237,32 +237,20 @@ powertecscsi_set_proc_info(struct Scsi_Host *host, char *buffer, int length) * inout - 0 for reading, 1 for writing. * Returns : length of data written to buffer. */ -int powertecscsi_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_t offset, - int length, int inout) +static int powertecscsi_show_info(struct seq_file *m, struct Scsi_Host *host) { struct powertec_info *info; - char *p = buffer; - int pos; - - if (inout == 1) - return powertecscsi_set_proc_info(host, buffer, length); info = (struct powertec_info *)host->hostdata; - p += sprintf(p, "PowerTec SCSI driver v%s\n", VERSION); - p += fas216_print_host(&info->info, p); - p += sprintf(p, "Term : o%s\n", + seq_printf(m, "PowerTec SCSI driver v%s\n", VERSION); + fas216_print_host(&info->info, m); + seq_printf(m, "Term : o%s\n", info->term_ctl ? "n" : "ff"); - p += fas216_print_stats(&info->info, p); - p += fas216_print_devices(&info->info, p); - - *start = buffer + offset; - pos = p - buffer - offset; - if (pos > length) - pos = length; - - return pos; + fas216_print_stats(&info->info, m); + fas216_print_devices(&info->info, m); + return 0; } static ssize_t powertecscsi_show_term(struct device *dev, struct device_attribute *attr, char *buf) @@ -291,7 +279,8 @@ static DEVICE_ATTR(bus_term, S_IRUGO | S_IWUSR, static struct scsi_host_template powertecscsi_template = { .module = THIS_MODULE, - .proc_info = powertecscsi_proc_info, + .show_info = powertecscsi_show_info, + .write_info = powertecscsi_set_proc_info, .name = "PowerTec SCSI", .info = powertecscsi_info, .queuecommand = fas216_queue_command, |