Loading drivers/scsi/wd7000.c +8 −23 Original line number Original line Diff line number Diff line Loading @@ -1296,9 +1296,9 @@ static void wd7000_revision(Adapter * host) #undef SPRINTF #undef SPRINTF #define SPRINTF(args...) { if (pos < (buffer + length)) pos += sprintf (pos, ## args); } #define SPRINTF(args...) { seq_printf(m, ## args); } static int wd7000_set_info(char *buffer, int length, struct Scsi_Host *host) static int wd7000_set_info(struct Scsi_Host *host, char *buffer, int length) { { dprintk("Buffer = <%.*s>, length = %d\n", length, buffer, length); dprintk("Buffer = <%.*s>, length = %d\n", length, buffer, length); Loading @@ -1310,22 +1310,15 @@ static int wd7000_set_info(char *buffer, int length, struct Scsi_Host *host) } } static int wd7000_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_t offset, int length, int inout) static int wd7000_show_info(struct seq_file *m, struct Scsi_Host *host) { { Adapter *adapter = (Adapter *)host->hostdata; Adapter *adapter = (Adapter *)host->hostdata; unsigned long flags; unsigned long flags; char *pos = buffer; #ifdef WD7000_DEBUG #ifdef WD7000_DEBUG Mailbox *ogmbs, *icmbs; Mailbox *ogmbs, *icmbs; short count; short count; #endif #endif /* * Has data been written to the file ? */ if (inout) return (wd7000_set_info(buffer, length, host)); spin_lock_irqsave(host->host_lock, flags); spin_lock_irqsave(host->host_lock, flags); SPRINTF("Host scsi%d: Western Digital WD-7000 (rev %d.%d)\n", host->host_no, adapter->rev1, adapter->rev2); SPRINTF("Host scsi%d: Western Digital WD-7000 (rev %d.%d)\n", host->host_no, adapter->rev1, adapter->rev2); SPRINTF(" IO base: 0x%x\n", adapter->iobase); SPRINTF(" IO base: 0x%x\n", adapter->iobase); Loading Loading @@ -1368,17 +1361,7 @@ static int wd7000_proc_info(struct Scsi_Host *host, char *buffer, char **start, spin_unlock_irqrestore(host->host_lock, flags); spin_unlock_irqrestore(host->host_lock, flags); /* return 0; * Calculate start of next buffer, and return value. */ *start = buffer + offset; if ((pos - buffer) < offset) return (0); else if ((pos - buffer - offset) < length) return (pos - buffer - offset); else return (length); } } Loading Loading @@ -1413,7 +1396,8 @@ static __init int wd7000_detect(struct scsi_host_template *tpnt) for (i = 0; i < NUM_CONFIGS; biosptr[i++] = -1); for (i = 0; i < NUM_CONFIGS; biosptr[i++] = -1); tpnt->proc_name = "wd7000"; tpnt->proc_name = "wd7000"; tpnt->proc_info = &wd7000_proc_info; tpnt->show_info = &wd7000_show_info; tpnt->write_info = wd7000_set_info; /* /* * Set up SCB free list, which is shared by all adapters * Set up SCB free list, which is shared by all adapters Loading Loading @@ -1658,7 +1642,8 @@ MODULE_LICENSE("GPL"); static struct scsi_host_template driver_template = { static struct scsi_host_template driver_template = { .proc_name = "wd7000", .proc_name = "wd7000", .proc_info = wd7000_proc_info, .show_info = wd7000_show_info, .write_info = wd7000_set_info, .name = "Western Digital WD-7000", .name = "Western Digital WD-7000", .detect = wd7000_detect, .detect = wd7000_detect, .release = wd7000_release, .release = wd7000_release, Loading Loading
drivers/scsi/wd7000.c +8 −23 Original line number Original line Diff line number Diff line Loading @@ -1296,9 +1296,9 @@ static void wd7000_revision(Adapter * host) #undef SPRINTF #undef SPRINTF #define SPRINTF(args...) { if (pos < (buffer + length)) pos += sprintf (pos, ## args); } #define SPRINTF(args...) { seq_printf(m, ## args); } static int wd7000_set_info(char *buffer, int length, struct Scsi_Host *host) static int wd7000_set_info(struct Scsi_Host *host, char *buffer, int length) { { dprintk("Buffer = <%.*s>, length = %d\n", length, buffer, length); dprintk("Buffer = <%.*s>, length = %d\n", length, buffer, length); Loading @@ -1310,22 +1310,15 @@ static int wd7000_set_info(char *buffer, int length, struct Scsi_Host *host) } } static int wd7000_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_t offset, int length, int inout) static int wd7000_show_info(struct seq_file *m, struct Scsi_Host *host) { { Adapter *adapter = (Adapter *)host->hostdata; Adapter *adapter = (Adapter *)host->hostdata; unsigned long flags; unsigned long flags; char *pos = buffer; #ifdef WD7000_DEBUG #ifdef WD7000_DEBUG Mailbox *ogmbs, *icmbs; Mailbox *ogmbs, *icmbs; short count; short count; #endif #endif /* * Has data been written to the file ? */ if (inout) return (wd7000_set_info(buffer, length, host)); spin_lock_irqsave(host->host_lock, flags); spin_lock_irqsave(host->host_lock, flags); SPRINTF("Host scsi%d: Western Digital WD-7000 (rev %d.%d)\n", host->host_no, adapter->rev1, adapter->rev2); SPRINTF("Host scsi%d: Western Digital WD-7000 (rev %d.%d)\n", host->host_no, adapter->rev1, adapter->rev2); SPRINTF(" IO base: 0x%x\n", adapter->iobase); SPRINTF(" IO base: 0x%x\n", adapter->iobase); Loading Loading @@ -1368,17 +1361,7 @@ static int wd7000_proc_info(struct Scsi_Host *host, char *buffer, char **start, spin_unlock_irqrestore(host->host_lock, flags); spin_unlock_irqrestore(host->host_lock, flags); /* return 0; * Calculate start of next buffer, and return value. */ *start = buffer + offset; if ((pos - buffer) < offset) return (0); else if ((pos - buffer - offset) < length) return (pos - buffer - offset); else return (length); } } Loading Loading @@ -1413,7 +1396,8 @@ static __init int wd7000_detect(struct scsi_host_template *tpnt) for (i = 0; i < NUM_CONFIGS; biosptr[i++] = -1); for (i = 0; i < NUM_CONFIGS; biosptr[i++] = -1); tpnt->proc_name = "wd7000"; tpnt->proc_name = "wd7000"; tpnt->proc_info = &wd7000_proc_info; tpnt->show_info = &wd7000_show_info; tpnt->write_info = wd7000_set_info; /* /* * Set up SCB free list, which is shared by all adapters * Set up SCB free list, which is shared by all adapters Loading Loading @@ -1658,7 +1642,8 @@ MODULE_LICENSE("GPL"); static struct scsi_host_template driver_template = { static struct scsi_host_template driver_template = { .proc_name = "wd7000", .proc_name = "wd7000", .proc_info = wd7000_proc_info, .show_info = wd7000_show_info, .write_info = wd7000_set_info, .name = "Western Digital WD-7000", .name = "Western Digital WD-7000", .detect = wd7000_detect, .detect = wd7000_detect, .release = wd7000_release, .release = wd7000_release, Loading