summaryrefslogtreecommitdiffstats
path: root/common/cmd_terminal.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_terminal.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_terminal.c')
-rw-r--r--common/cmd_terminal.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/common/cmd_terminal.c b/common/cmd_terminal.c
index 57943c10b9..67a2546731 100644
--- a/common/cmd_terminal.c
+++ b/common/cmd_terminal.c
@@ -27,10 +27,10 @@
#include <common.h>
#include <command.h>
#include <devices.h>
+#include <serial.h>
int do_terminal(cmd_tbl_t * cmd, int flag, int argc, char *argv[])
{
- int i, l;
int last_tilde = 0;
device_t *dev = NULL;
@@ -38,13 +38,7 @@ int do_terminal(cmd_tbl_t * cmd, int flag, int argc, char *argv[])
return -1;
/* Scan for selected output/input device */
- for (i = 1; i <= ListNumItems (devlist); i++) {
- device_t *tmp = ListGetPtrToItem (devlist, i);
- if (!strcmp(tmp->name, argv[1])) {
- dev = tmp;
- break;
- }
- }
+ dev = device_get_by_name(argv[1]);
if (!dev)
return -1;