summaryrefslogtreecommitdiff
path: root/drivers/nubus/proc.c
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2018-01-13 17:37:13 -0500
committerGeert Uytterhoeven <geert@linux-m68k.org>2018-01-16 16:47:29 +0100
commit41b848160eabb22957652936b66ccafd95ab5ad8 (patch)
treef38449c4f4a4694f6c3215262919dc45c92aeb24 /drivers/nubus/proc.c
parent189e19e8cbb49f5bf483e55bdbd1e56d3d6bcf75 (diff)
downloadlwn-41b848160eabb22957652936b66ccafd95ab5ad8.tar.gz
lwn-41b848160eabb22957652936b66ccafd95ab5ad8.zip
nubus: Adopt standard linked list implementation
This increases code re-use and improves readability. Cc: "David S. Miller" <davem@davemloft.net> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Tested-by: Stan Johnson <userm57@yahoo.com> Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'drivers/nubus/proc.c')
-rw-r--r--drivers/nubus/proc.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/nubus/proc.c b/drivers/nubus/proc.c
index f2b118330be0..60c0f40b4d5e 100644
--- a/drivers/nubus/proc.c
+++ b/drivers/nubus/proc.c
@@ -36,15 +36,12 @@
static int
nubus_devices_proc_show(struct seq_file *m, void *v)
{
- struct nubus_rsrc *fres = nubus_func_rsrcs;
+ struct nubus_rsrc *fres;
- while (fres) {
- seq_printf(m, "%x\t%04x %04x %04x %04x",
+ for_each_func_rsrc(fres)
+ seq_printf(m, "%x\t%04x %04x %04x %04x\t%08lx\n",
fres->board->slot, fres->category, fres->type,
- fres->dr_sw, fres->dr_hw);
- seq_printf(m, "\t%08lx\n", fres->board->slot_addr);
- fres = fres->next;
- }
+ fres->dr_sw, fres->dr_hw, fres->board->slot_addr);
return 0;
}