]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/cmd_bmp.c
"env grep" - add options to grep in name, value, or both.
[karo-tx-uboot.git] / common / cmd_bmp.c
index 23fc82fe4b4bff32a16365ac5d8a44219e5ae063..5a52edde31dff8c4083baa449302ffab1b906cb4 100644 (file)
@@ -31,9 +31,9 @@
 #include <command.h>
 #include <asm/byteorder.h>
 #include <malloc.h>
+#include <video.h>
 
 static int bmp_info (ulong addr);
-static int bmp_display (ulong addr, int x, int y);
 
 /*
  * Allocate and decompress a BMP image using gunzip().
@@ -102,7 +102,7 @@ static int do_bmp_info(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[
                addr = simple_strtoul(argv[1], NULL, 16);
                break;
        default:
-               return cmd_usage(cmdtp);
+               return CMD_RET_USAGE;
        }
 
        return (bmp_info(addr));
@@ -126,7 +126,7 @@ static int do_bmp_display(cmd_tbl_t * cmdtp, int flag, int argc, char * const ar
                y = simple_strtoul(argv[3], NULL, 10);
                break;
        default:
-               return cmd_usage(cmdtp);
+               return CMD_RET_USAGE;
        }
 
         return (bmp_display(addr, x, y));
@@ -166,7 +166,7 @@ static int do_bmp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        if (c)
                return  c->cmd(cmdtp, flag, argc, argv);
        else
-               return cmd_usage(cmdtp);
+               return CMD_RET_USAGE;
 }
 
 U_BOOT_CMD(
@@ -221,7 +221,7 @@ static int bmp_info(ulong addr)
  * Return:      None
  *
  */
-static int bmp_display(ulong addr, int x, int y)
+int bmp_display(ulong addr, int x, int y)
 {
        int ret;
        bmp_image_t *bmp = (bmp_image_t *)addr;
@@ -237,13 +237,9 @@ static int bmp_display(ulong addr, int x, int y)
        }
 
 #if defined(CONFIG_LCD)
-       extern int lcd_display_bitmap (ulong, int, int);
-
-       ret = lcd_display_bitmap ((unsigned long)bmp, x, y);
+       ret = lcd_display_bitmap((ulong)bmp, x, y);
 #elif defined(CONFIG_VIDEO)
-       extern int video_display_bitmap (ulong, int, int);
-
-       ret = video_display_bitmap ((unsigned long)bmp, x, y);
+       ret = video_display_bitmap((unsigned long)bmp, x, y);
 #else
 # error bmp_display() requires CONFIG_LCD or CONFIG_VIDEO
 #endif