Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dc395x: switch to ->show_info()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro d32812ae ff98f7ce

+4 -16
+4 -16
drivers/scsi/dc395x.c
··· 4616 4616 4617 4617 4618 4618 #undef SPRINTF 4619 - #define SPRINTF(args...) pos += sprintf(pos, args) 4619 + #define SPRINTF(args...) seq_printf(m,##args) 4620 4620 4621 4621 #undef YESNO 4622 4622 #define YESNO(YN) \ 4623 4623 if (YN) SPRINTF(" Yes ");\ 4624 4624 else SPRINTF(" No ") 4625 4625 4626 - static int dc395x_proc_info(struct Scsi_Host *host, char *buffer, 4627 - char **start, off_t offset, int length, int inout) 4626 + static int dc395x_show_info(struct seq_file *m, struct Scsi_Host *host) 4628 4627 { 4629 4628 struct AdapterCtlBlk *acb = (struct AdapterCtlBlk *)host->hostdata; 4630 4629 int spd, spd1; 4631 - char *pos = buffer; 4632 4630 struct DeviceCtlBlk *dcb; 4633 4631 unsigned long flags; 4634 4632 int dev; 4635 - 4636 - if (inout) /* Has data been written to the file ? */ 4637 - return -EPERM; 4638 4633 4639 4634 SPRINTF(DC395X_BANNER " PCI SCSI Host Adapter\n"); 4640 4635 SPRINTF(" Driver Version " DC395X_VERSION "\n"); ··· 4730 4735 SPRINTF("END\n"); 4731 4736 } 4732 4737 4733 - *start = buffer + offset; 4734 4738 DC395x_UNLOCK_IO(acb->scsi_host, flags); 4735 - 4736 - if (pos - buffer < offset) 4737 - return 0; 4738 - else if (pos - buffer - offset < length) 4739 - return pos - buffer - offset; 4740 - else 4741 - return length; 4739 + return 0; 4742 4740 } 4743 4741 4744 4742 4745 4743 static struct scsi_host_template dc395x_driver_template = { 4746 4744 .module = THIS_MODULE, 4747 4745 .proc_name = DC395X_NAME, 4748 - .proc_info = dc395x_proc_info, 4746 + .show_info = dc395x_show_info, 4749 4747 .name = DC395X_BANNER " " DC395X_VERSION, 4750 4748 .queuecommand = dc395x_queue_command, 4751 4749 .bios_param = dc395x_bios_param,