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

sata_svw: switch to ->show_info()

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

Al Viro 3f025677 1bb7109a

+7 -22
+7 -22
drivers/ata/sata_svw.c
··· 322 322 } 323 323 324 324 #ifdef CONFIG_PPC_OF 325 - /* 326 - * k2_sata_proc_info 327 - * inout : decides on the direction of the dataflow and the meaning of the 328 - * variables 329 - * buffer: If inout==FALSE data is being written to it else read from it 330 - * *start: If inout==FALSE start of the valid data in the buffer 331 - * offset: If inout==FALSE offset from the beginning of the imaginary file 332 - * from which we start writing into the buffer 333 - * length: If inout==FALSE max number of bytes to be written into the buffer 334 - * else number of bytes in the buffer 335 - */ 336 - static int k2_sata_proc_info(struct Scsi_Host *shost, char *page, char **start, 337 - off_t offset, int count, int inout) 325 + static int k2_sata_show_info(struct seq_file *m, struct Scsi_Host *shost) 338 326 { 339 327 struct ata_port *ap; 340 328 struct device_node *np; 341 - int len, index; 329 + int index; 342 330 343 331 /* Find the ata_port */ 344 332 ap = ata_shost_to_port(shost); ··· 344 356 const u32 *reg = of_get_property(np, "reg", NULL); 345 357 if (!reg) 346 358 continue; 347 - if (index == *reg) 359 + if (index == *reg) { 360 + seq_printf(m, "devspec: %s\n", np->full_name); 348 361 break; 362 + } 349 363 } 350 - if (np == NULL) 351 - return 0; 352 - 353 - len = sprintf(page, "devspec: %s\n", np->full_name); 354 - 355 - return len; 364 + return 0; 356 365 } 357 366 #endif /* CONFIG_PPC_OF */ 358 367 ··· 357 372 static struct scsi_host_template k2_sata_sht = { 358 373 ATA_BMDMA_SHT(DRV_NAME), 359 374 #ifdef CONFIG_PPC_OF 360 - .proc_info = k2_sata_proc_info, 375 + .show_info = k2_sata_show_info, 361 376 #endif 362 377 }; 363 378