aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/arm/cumana_2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/arm/cumana_2.c')
-rw-r--r--drivers/scsi/arm/cumana_2.c43
1 files changed, 9 insertions, 34 deletions
diff --git a/drivers/scsi/arm/cumana_2.c b/drivers/scsi/arm/cumana_2.c
index e3bae93c3c22..58915f29055b 100644
--- a/drivers/scsi/arm/cumana_2.c
+++ b/drivers/scsi/arm/cumana_2.c
@@ -337,50 +337,25 @@ cumanascsi_2_set_proc_info(struct Scsi_Host *host, char *buffer, int length)
337 return ret; 337 return ret;
338} 338}
339 339
340/* Prototype: int cumanascsi_2_proc_info(char *buffer, char **start, off_t offset, 340static int cumanascsi_2_show_info(struct seq_file *m, struct Scsi_Host *host)
341 * int length, int host_no, int inout)
342 * Purpose : Return information about the driver to a user process accessing
343 * the /proc filesystem.
344 * Params : buffer - a buffer to write information to
345 * start - a pointer into this buffer set by this routine to the start
346 * of the required information.
347 * offset - offset into information that we have read up to.
348 * length - length of buffer
349 * host_no - host number to return information for
350 * inout - 0 for reading, 1 for writing.
351 * Returns : length of data written to buffer.
352 */
353int cumanascsi_2_proc_info (struct Scsi_Host *host, char *buffer, char **start, off_t offset,
354 int length, int inout)
355{ 341{
356 struct cumanascsi2_info *info; 342 struct cumanascsi2_info *info;
357 char *p = buffer;
358 int pos;
359
360 if (inout == 1)
361 return cumanascsi_2_set_proc_info(host, buffer, length);
362
363 info = (struct cumanascsi2_info *)host->hostdata; 343 info = (struct cumanascsi2_info *)host->hostdata;
364 344
365 p += sprintf(p, "Cumana SCSI II driver v%s\n", VERSION); 345 seq_printf(m, "Cumana SCSI II driver v%s\n", VERSION);
366 p += fas216_print_host(&info->info, p); 346 fas216_print_host(&info->info, m);
367 p += sprintf(p, "Term : o%s\n", 347 seq_printf(m, "Term : o%s\n",
368 info->terms ? "n" : "ff"); 348 info->terms ? "n" : "ff");
369 349
370 p += fas216_print_stats(&info->info, p); 350 fas216_print_stats(&info->info, m);
371 p += fas216_print_devices(&info->info, p); 351 fas216_print_devices(&info->info, m);
372 352 return 0;
373 *start = buffer + offset;
374 pos = p - buffer - offset;
375 if (pos > length)
376 pos = length;
377
378 return pos;
379} 353}
380 354
381static struct scsi_host_template cumanascsi2_template = { 355static struct scsi_host_template cumanascsi2_template = {
382 .module = THIS_MODULE, 356 .module = THIS_MODULE,
383 .proc_info = cumanascsi_2_proc_info, 357 .show_info = cumanascsi_2_show_info,
358 .write_info = cumanascsi_2_set_proc_info,
384 .name = "Cumana SCSI II", 359 .name = "Cumana SCSI II",
385 .info = cumanascsi_2_info, 360 .info = cumanascsi_2_info,
386 .queuecommand = fas216_queue_command, 361 .queuecommand = fas216_queue_command,