diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-03-31 03:24:12 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-04-09 14:13:24 -0400 |
commit | d32812ae4b94a306e84cfbfbfeecda4ba3d1ba0f (patch) | |
tree | c24ac2a22a07bc4caa1c03f6d7908ebf2763dec9 /drivers/scsi/dc395x.c | |
parent | ff98f7ce0ec89a3de50a1920eb8a223bf0a3a6f2 (diff) |
dc395x: switch to ->show_info()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/scsi/dc395x.c')
-rw-r--r-- | drivers/scsi/dc395x.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c index fed486bfd3f..694e13c45df 100644 --- a/drivers/scsi/dc395x.c +++ b/drivers/scsi/dc395x.c @@ -4616,26 +4616,21 @@ static void adapter_uninit(struct AdapterCtlBlk *acb) #undef SPRINTF -#define SPRINTF(args...) pos += sprintf(pos, args) +#define SPRINTF(args...) seq_printf(m,##args) #undef YESNO #define YESNO(YN) \ if (YN) SPRINTF(" Yes ");\ else SPRINTF(" No ") -static int dc395x_proc_info(struct Scsi_Host *host, char *buffer, - char **start, off_t offset, int length, int inout) +static int dc395x_show_info(struct seq_file *m, struct Scsi_Host *host) { struct AdapterCtlBlk *acb = (struct AdapterCtlBlk *)host->hostdata; int spd, spd1; - char *pos = buffer; struct DeviceCtlBlk *dcb; unsigned long flags; int dev; - if (inout) /* Has data been written to the file ? */ - return -EPERM; - SPRINTF(DC395X_BANNER " PCI SCSI Host Adapter\n"); SPRINTF(" Driver Version " DC395X_VERSION "\n"); @@ -4735,22 +4730,15 @@ static int dc395x_proc_info(struct Scsi_Host *host, char *buffer, SPRINTF("END\n"); } - *start = buffer + offset; DC395x_UNLOCK_IO(acb->scsi_host, flags); - - if (pos - buffer < offset) - return 0; - else if (pos - buffer - offset < length) - return pos - buffer - offset; - else - return length; + return 0; } static struct scsi_host_template dc395x_driver_template = { .module = THIS_MODULE, .proc_name = DC395X_NAME, - .proc_info = dc395x_proc_info, + .show_info = dc395x_show_info, .name = DC395X_BANNER " " DC395X_VERSION, .queuecommand = dc395x_queue_command, .bios_param = dc395x_bios_param, |