X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=api%2Fapi.c;h=853f010fee93c6c321cf418f3920b9ec62b0724a;hb=4ecfcfaa9ed1bb2ee73585752f9c36a12d1600c6;hp=0598d9082dc368915bb877195de33677f864c72a;hpb=bb66f5613672fc80a6b38a0e1651d893bbe590a5;p=u-boot diff --git a/api/api.c b/api/api.c index 0598d9082d..853f010fee 100644 --- a/api/api.c +++ b/api/api.c @@ -24,12 +24,10 @@ */ #include - -#if defined(CONFIG_API) - #include #include #include +#include #include #include @@ -38,11 +36,6 @@ #define DEBUG #undef DEBUG -/* U-Boot routines needed */ -extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); -extern uchar (*env_get_char)(int); -extern uchar *env_get_addr(int); - /***************************************************************************** * * This is the API core. @@ -535,7 +528,7 @@ static int API_env_enum(va_list ap) for (i = 0; env_get_char(i) != '\0'; i = n + 1) { for (n = i; env_get_char(n) != '\0'; ++n) { - if (n >= CFG_ENV_SIZE) { + if (n >= CONFIG_ENV_SIZE) { /* XXX shouldn't we set *next = NULL?? */ return 0; } @@ -583,7 +576,7 @@ int syscall(int call, int *retval, ...) va_list ap; int rv; - if (call < 0 || call >= calls_no || calls_table[call] == NULL) { + if (call < 0 || call >= calls_no) { debugf("invalid call #%d\n", call); return 0; } @@ -666,5 +659,3 @@ void platform_set_mr(struct sys_info *si, unsigned long start, unsigned long siz return; } } - -#endif /* CONFIG_API */