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

wd7000: switch to ->show_info()

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

Al Viro cab29b99 ee127fec

+8 -23
+8 -23
drivers/scsi/wd7000.c
··· 1296 1296 1297 1297 1298 1298 #undef SPRINTF 1299 - #define SPRINTF(args...) { if (pos < (buffer + length)) pos += sprintf (pos, ## args); } 1299 + #define SPRINTF(args...) { seq_printf(m, ## args); } 1300 1300 1301 - static int wd7000_set_info(char *buffer, int length, struct Scsi_Host *host) 1301 + static int wd7000_set_info(struct Scsi_Host *host, char *buffer, int length) 1302 1302 { 1303 1303 dprintk("Buffer = <%.*s>, length = %d\n", length, buffer, length); 1304 1304 ··· 1310 1310 } 1311 1311 1312 1312 1313 - static int wd7000_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_t offset, int length, int inout) 1313 + static int wd7000_show_info(struct seq_file *m, struct Scsi_Host *host) 1314 1314 { 1315 1315 Adapter *adapter = (Adapter *)host->hostdata; 1316 1316 unsigned long flags; 1317 - char *pos = buffer; 1318 1317 #ifdef WD7000_DEBUG 1319 1318 Mailbox *ogmbs, *icmbs; 1320 1319 short count; 1321 1320 #endif 1322 - 1323 - /* 1324 - * Has data been written to the file ? 1325 - */ 1326 - if (inout) 1327 - return (wd7000_set_info(buffer, length, host)); 1328 1321 1329 1322 spin_lock_irqsave(host->host_lock, flags); 1330 1323 SPRINTF("Host scsi%d: Western Digital WD-7000 (rev %d.%d)\n", host->host_no, adapter->rev1, adapter->rev2); ··· 1361 1368 1362 1369 spin_unlock_irqrestore(host->host_lock, flags); 1363 1370 1364 - /* 1365 - * Calculate start of next buffer, and return value. 1366 - */ 1367 - *start = buffer + offset; 1368 - 1369 - if ((pos - buffer) < offset) 1370 - return (0); 1371 - else if ((pos - buffer - offset) < length) 1372 - return (pos - buffer - offset); 1373 - else 1374 - return (length); 1371 + return 0; 1375 1372 } 1376 1373 1377 1374 ··· 1396 1413 for (i = 0; i < NUM_CONFIGS; biosptr[i++] = -1); 1397 1414 1398 1415 tpnt->proc_name = "wd7000"; 1399 - tpnt->proc_info = &wd7000_proc_info; 1416 + tpnt->show_info = &wd7000_show_info; 1417 + tpnt->write_info = wd7000_set_info; 1400 1418 1401 1419 /* 1402 1420 * Set up SCB free list, which is shared by all adapters ··· 1642 1658 1643 1659 static struct scsi_host_template driver_template = { 1644 1660 .proc_name = "wd7000", 1645 - .proc_info = wd7000_proc_info, 1661 + .show_info = wd7000_show_info, 1662 + .write_info = wd7000_set_info, 1646 1663 .name = "Western Digital WD-7000", 1647 1664 .detect = wd7000_detect, 1648 1665 .release = wd7000_release,