summaryrefslogtreecommitdiffstats
path: root/common/cmd_console.c
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2008-08-31 04:24:55 +0200
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2008-08-31 04:24:55 +0200
commitc1de7a6daf9c657484e1c6d433f01fccd49a7f48 (patch)
tree7d73ef79e8208b3ac21de13a4a4e968dbf0e6e19 /common/cmd_console.c
parentef0255fc75f28655f9681422079287d68a14dbaa (diff)
downloadu-boot-c1de7a6daf9c657484e1c6d433f01fccd49a7f48.tar.gz
u-boot-c1de7a6daf9c657484e1c6d433f01fccd49a7f48.tar.xz
u-boot-c1de7a6daf9c657484e1c6d433f01fccd49a7f48.zip
devices: merge to list_head
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'common/cmd_console.c')
-rw-r--r--common/cmd_console.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/common/cmd_console.c b/common/cmd_console.c
index 50ddb011cd..e2bc2a30d9 100644
--- a/common/cmd_console.c
+++ b/common/cmd_console.c
@@ -31,14 +31,17 @@
extern void _do_coninfo (void);
int do_coninfo (cmd_tbl_t * cmd, int flag, int argc, char *argv[])
{
- int i, l;
+ int l;
+ struct list_head *list = device_get_list();
+ struct list_head *pos;
+ device_t *dev;
/* Scan for valid output and input devices */
puts ("List of available devices:\n");
- for (i = 1; i <= ListNumItems (devlist); i++) {
- device_t *dev = ListGetPtrToItem (devlist, i);
+ list_for_each(pos, list) {
+ dev = list_entry(pos, device_t, list);
printf ("%-8s %08x %c%c%c ",
dev->name,