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/arxescsi.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/arxescsi.c')
-rw-r--r-- | drivers/scsi/arm/arxescsi.c | 40 |
1 files changed, 7 insertions, 33 deletions
diff --git a/drivers/scsi/arm/arxescsi.c b/drivers/scsi/arm/arxescsi.c index 9274510294ac..32d23212de48 100644 --- a/drivers/scsi/arm/arxescsi.c +++ b/drivers/scsi/arm/arxescsi.c | |||
@@ -220,47 +220,21 @@ static const char *arxescsi_info(struct Scsi_Host *host) | |||
220 | return string; | 220 | return string; |
221 | } | 221 | } |
222 | 222 | ||
223 | /* | ||
224 | * Function: int arxescsi_proc_info(char *buffer, char **start, off_t offset, | ||
225 | * int length, int host_no, int inout) | ||
226 | * Purpose : Return information about the driver to a user process accessing | ||
227 | * the /proc filesystem. | ||
228 | * Params : buffer - a buffer to write information to | ||
229 | * start - a pointer into this buffer set by this routine to the start | ||
230 | * of the required information. | ||
231 | * offset - offset into information that we have read up to. | ||
232 | * length - length of buffer | ||
233 | * host_no - host number to return information for | ||
234 | * inout - 0 for reading, 1 for writing. | ||
235 | * Returns : length of data written to buffer. | ||
236 | */ | ||
237 | static int | 223 | static int |
238 | arxescsi_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_t offset, int length, | 224 | arxescsi_show_info(struct seq_file *m, struct Scsi_Host *host) |
239 | int inout) | ||
240 | { | 225 | { |
241 | struct arxescsi_info *info; | 226 | struct arxescsi_info *info; |
242 | char *p = buffer; | ||
243 | int pos; | ||
244 | |||
245 | info = (struct arxescsi_info *)host->hostdata; | 227 | info = (struct arxescsi_info *)host->hostdata; |
246 | if (inout == 1) | ||
247 | return -EINVAL; | ||
248 | |||
249 | p += sprintf(p, "ARXE 16-bit SCSI driver v%s\n", VERSION); | ||
250 | p += fas216_print_host(&info->info, p); | ||
251 | p += fas216_print_stats(&info->info, p); | ||
252 | p += fas216_print_devices(&info->info, p); | ||
253 | |||
254 | *start = buffer + offset; | ||
255 | pos = p - buffer - offset; | ||
256 | if (pos > length) | ||
257 | pos = length; | ||
258 | 228 | ||
259 | return pos; | 229 | seq_printf(m, "ARXE 16-bit SCSI driver v%s\n", VERSION); |
230 | fas216_print_host(&info->info, m); | ||
231 | fas216_print_stats(&info->info, m); | ||
232 | fas216_print_devices(&info->info, m); | ||
233 | return 0; | ||
260 | } | 234 | } |
261 | 235 | ||
262 | static struct scsi_host_template arxescsi_template = { | 236 | static struct scsi_host_template arxescsi_template = { |
263 | .proc_info = arxescsi_proc_info, | 237 | .show_info = arxescsi_show_info, |
264 | .name = "ARXE SCSI card", | 238 | .name = "ARXE SCSI card", |
265 | .info = arxescsi_info, | 239 | .info = arxescsi_info, |
266 | .queuecommand = fas216_noqueue_command, | 240 | .queuecommand = fas216_noqueue_command, |