aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_svw.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-03-31 12:46:43 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-04-09 14:13:28 -0400
commit3f02567750c302637dedbb4fb90682999a770122 (patch)
tree75dee2dac093fee1a95d10890c6908e798f94329 /drivers/ata/sata_svw.c
parent1bb7109a1c7dd6266db0240b7f344fbed20b9063 (diff)
sata_svw: switch to ->show_info()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/ata/sata_svw.c')
-rw-r--r--drivers/ata/sata_svw.c29
1 files changed, 7 insertions, 22 deletions
diff --git a/drivers/ata/sata_svw.c b/drivers/ata/sata_svw.c
index 08608de87e4e..dc4f70179e7d 100644
--- a/drivers/ata/sata_svw.c
+++ b/drivers/ata/sata_svw.c
@@ -322,23 +322,11 @@ static u8 k2_stat_check_status(struct ata_port *ap)
322} 322}
323 323
324#ifdef CONFIG_PPC_OF 324#ifdef CONFIG_PPC_OF
325/* 325static int k2_sata_show_info(struct seq_file *m, struct Scsi_Host *shost)
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 */
336static int k2_sata_proc_info(struct Scsi_Host *shost, char *page, char **start,
337 off_t offset, int count, int inout)
338{ 326{
339 struct ata_port *ap; 327 struct ata_port *ap;
340 struct device_node *np; 328 struct device_node *np;
341 int len, index; 329 int index;
342 330
343 /* Find the ata_port */ 331 /* Find the ata_port */
344 ap = ata_shost_to_port(shost); 332 ap = ata_shost_to_port(shost);
@@ -356,15 +344,12 @@ static int k2_sata_proc_info(struct Scsi_Host *shost, char *page, char **start,
356 const u32 *reg = of_get_property(np, "reg", NULL); 344 const u32 *reg = of_get_property(np, "reg", NULL);
357 if (!reg) 345 if (!reg)
358 continue; 346 continue;
359 if (index == *reg) 347 if (index == *reg) {
348 seq_printf(m, "devspec: %s\n", np->full_name);
360 break; 349 break;
350 }
361 } 351 }
362 if (np == NULL) 352 return 0;
363 return 0;
364
365 len = sprintf(page, "devspec: %s\n", np->full_name);
366
367 return len;
368} 353}
369#endif /* CONFIG_PPC_OF */ 354#endif /* CONFIG_PPC_OF */
370 355
@@ -372,7 +357,7 @@ static int k2_sata_proc_info(struct Scsi_Host *shost, char *page, char **start,
372static struct scsi_host_template k2_sata_sht = { 357static struct scsi_host_template k2_sata_sht = {
373 ATA_BMDMA_SHT(DRV_NAME), 358 ATA_BMDMA_SHT(DRV_NAME),
374#ifdef CONFIG_PPC_OF 359#ifdef CONFIG_PPC_OF
375 .proc_info = k2_sata_proc_info, 360 .show_info = k2_sata_show_info,
376#endif 361#endif
377}; 362};
378 363