summaryrefslogtreecommitdiffstats
path: root/common/cmd_console.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2008-09-01 00:16:29 +0200
committerWolfgang Denk <wd@denx.de>2008-09-01 00:16:29 +0200
commite99e9575bbeba1b7c48e046547cae065ec0071de (patch)
treec08553c4d06725bd6013a46068df0059c5b49a00 /common/cmd_console.c
parenta13b2d937941f6b525abfcfad96c034f94421188 (diff)
parent08ab4e1780fa63c88dd5a5ab52f4ff4ed1ee1878 (diff)
downloadu-boot-e99e9575bbeba1b7c48e046547cae065ec0071de.tar.gz
u-boot-e99e9575bbeba1b7c48e046547cae065ec0071de.tar.xz
u-boot-e99e9575bbeba1b7c48e046547cae065ec0071de.zip
Merge branch 'Makefile' of git://git.denx.de/u-boot-arm
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,