move prototypes for gunzip() and zunzip() to common.h
authorWolfgang Wegner <w.wegner@astro-kom.de>
Wed, 9 Dec 2009 14:16:47 +0000 (15:16 +0100)
committerWolfgang Denk <wd@denx.de>
Mon, 21 Dec 2009 20:39:59 +0000 (21:39 +0100)
Prototype for gunzip/zunzip was only in lib_generic/gunzip.c and thus
repeated in every file using it. This patch moves the prototypes to
common.h and removes all prototypes distributed anywhere else.

Signed-off-by: Wolfgang Wegner <w.wegner@astro-kom.de>
24 files changed:
board/bf527-ezkit/video.c
board/bf533-stamp/video.c
board/bf548-ezkit/video.c
board/cm-bf548/video.c
board/dave/PPChameleonEVB/PPChameleonEVB.c
board/esd/apc405/apc405.c
board/esd/ash405/ash405.c
board/esd/cpci405/cpci405.c
board/esd/hh405/hh405.c
board/esd/pci405/pci405.c
board/esd/plu405/plu405.c
board/esd/tasreg/tasreg.c
board/esd/voh405/voh405.c
board/esd/wuh405/wuh405.c
board/mpl/common/common_util.c
board/prodrive/pdnb3/pdnb3.c
common/cmd_bmp.c
common/cmd_bootm.c
common/cmd_license.c
common/cmd_mem.c
drivers/video/cfb_console.c
fs/ubifs/ubifs.h
include/common.h
lib_generic/gunzip.c

index 0b6b7b2..57652be 100644 (file)
@@ -16,8 +16,6 @@
 #include <linux/types.h>
 #include <stdio_dev.h>
 
-int gunzip(void *, int, unsigned char *, unsigned long *);
-
 #define DMA_SIZE16     2
 
 #include <asm/mach-common/bits/ppi.h>
index 28ffa61..939bd35 100644 (file)
@@ -20,8 +20,6 @@
 #include <linux/types.h>
 #include <stdio_dev.h>
 
-int gunzip(void *, int, unsigned char *, unsigned long *);
-
 #define DMA_SIZE16     2
 
 #include <asm/mach-common/bits/ppi.h>
index f4f1bec..10b08e2 100644 (file)
@@ -16,8 +16,6 @@
 #include <linux/types.h>
 #include <stdio_dev.h>
 
-int gunzip(void *, int, unsigned char *, unsigned long *);
-
 #define DMA_SIZE16     2
 
 #include <asm/mach-common/bits/eppi.h>
index 0787342..4097f09 100644 (file)
@@ -16,8 +16,6 @@
 #include <linux/types.h>
 #include <stdio_dev.h>
 
-int gunzip(void *, int, unsigned char *, unsigned long *);
-
 #ifdef CONFIG_VIDEO
 
 #define DMA_SIZE16     2
index 06de6e0..6bc70ef 100644 (file)
@@ -33,9 +33,6 @@ DECLARE_GLOBAL_DATA_PTR;
 
 /* ------------------------------------------------------------------------- */
 
-/* Prototypes */
-int gunzip(void *, int, unsigned char *, unsigned long *);
-
 int board_early_init_f (void)
 {
        out32(GPIO0_OR, CONFIG_SYS_NAND0_CE);                 /* set initial outputs     */
index 409a054..72c0907 100644 (file)
@@ -54,9 +54,6 @@ const unsigned char fpgadata[] =
  */
 #include "../common/fpga.c"
 
-/* Prototypes */
-int gunzip(void *, int, unsigned char *, unsigned long *);
-
 #ifdef CONFIG_LCD_USED
 /* logo bitmap data - gzip compressed and generated by bin2c */
 unsigned char logo_bmp[] =
index 5f0e67c..0615959 100644 (file)
@@ -48,10 +48,6 @@ const unsigned char fpgadata[] =
 #include "../common/fpga.c"
 
 
-/* Prototypes */
-int gunzip(void *, int, unsigned char *, unsigned long *);
-
-
 int board_early_init_f (void)
 {
        /*
index c29c876..24db883 100644 (file)
@@ -89,7 +89,6 @@ int N_AU_IMAGES = (sizeof(au_image) / sizeof(au_image[0]));
 
 /* Prototypes */
 int cpci405_version(void);
-int gunzip(void *, int, unsigned char *, unsigned long *);
 void lxt971_no_sleep(void);
 
 int board_early_init_f(void)
index 132531b..4251d51 100644 (file)
@@ -251,10 +251,6 @@ const unsigned char fpgadata[] =
 #include "../common/fpga.c"
 
 
-/* Prototypes */
-int gunzip(void *, int, unsigned char *, unsigned long *);
-
-
 /* logo bitmap data - gzip compressed and generated by bin2c */
 unsigned char logo_bmp_320[] =
 {
index 34a1632..5364857 100644 (file)
@@ -34,7 +34,6 @@
 DECLARE_GLOBAL_DATA_PTR;
 
 /* Prototypes */
-int gunzip(void *, int, unsigned char *, unsigned long *);
 int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
 unsigned long fpga_done_state(void);
 unsigned long fpga_init_state(void);
index fcffdf6..e385a78 100644 (file)
@@ -46,9 +46,6 @@ const unsigned char fpgadata[] =
  */
 #include "../common/fpga.c"
 
-/* Prototypes */
-int gunzip(void *, int, unsigned char *, unsigned long *);
-
 int board_early_init_f(void)
 {
        /*
index 1844442..bd9fb2f 100644 (file)
@@ -29,7 +29,6 @@
 
 
 /* Prototypes */
-int gunzip(void *, int, unsigned char *, unsigned long *);
 int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
 int i2c_write(uchar chip, uint addr, int alen, uchar *buffer, int len);
 int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len);
index 3f81665..a5600de 100644 (file)
@@ -48,10 +48,6 @@ const unsigned char fpgadata[] =
 #include "../common/fpga.c"
 
 
-/* Prototypes */
-int gunzip(void *, int, unsigned char *, unsigned long *);
-
-
 /* logo bitmap data - gzip compressed and generated by bin2c */
 unsigned char logo_bmp_320[] =
 {
index f2591d5..01966ee 100644 (file)
@@ -46,10 +46,6 @@ const unsigned char fpgadata[] =
 #include "../common/fpga.c"
 
 
-/* Prototypes */
-int gunzip(void *, int, unsigned char *, unsigned long *);
-
-
 int board_early_init_f (void)
 {
        /*
index 61af4ae..32bf244 100644 (file)
@@ -48,7 +48,6 @@ DECLARE_GLOBAL_DATA_PTR;
 #define FIRM_START 0xFFF00000
 #endif
 
-extern int gunzip(void *, int, uchar *, unsigned long *);
 extern int mem_test(ulong start, ulong ramsize, int quiet);
 
 #define I2C_BACKUP_ADDR 0x7C00         /* 0x200 bytes for backup */
index c323456..69f8f9b 100644 (file)
@@ -29,7 +29,6 @@
 DECLARE_GLOBAL_DATA_PTR;
 
 /* Prototypes */
-int gunzip(void *, int, unsigned char *, unsigned long *);
 int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
 
 /* predefine these here for FPGA programming (before including fpga.c) */
index faa10a4..74ab24c 100644 (file)
@@ -35,8 +35,6 @@
 static int bmp_info (ulong addr);
 static int bmp_display (ulong addr, int x, int y);
 
-int gunzip(void *, int, unsigned char *, unsigned long *);
-
 /*
  * Allocate and decompress a BMP image using gunzip().
  *
index efd6aec..94ddac3 100644 (file)
@@ -63,7 +63,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-extern int gunzip (void *dst, int dstlen, unsigned char *src, unsigned long *lenp);
 #ifndef CONFIG_SYS_BOOTM_LEN
 #define CONFIG_SYS_BOOTM_LEN   0x800000        /* use 8MByte as default max gunzip size */
 #endif
index c6f272a..85a4871 100644 (file)
@@ -29,7 +29,6 @@
 #include <command.h>
 #include <malloc.h>
 #include <license.h>
-int gunzip(void *, int, unsigned char *, unsigned long *);
 
 int do_license(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 {
index a34b342..1839330 100644 (file)
@@ -1225,8 +1225,6 @@ int do_sha1sum(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 #endif
 
 #ifdef CONFIG_CMD_UNZIP
-int  gunzip (void *, int, unsigned char *, unsigned long *);
-
 int do_unzip ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 {
        unsigned long src, dst;
index 16d6689..c07a26e 100644 (file)
@@ -403,8 +403,6 @@ static const int video_font_draw_table32[16][4] = {
            { 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff } };
 
 
-int gunzip(void *, int, unsigned char *, unsigned long *);
-
 /******************************************************************************/
 
 static void video_drawchars (int xx, int yy, unsigned char *s, int count)
index 06772af..0af471a 100644 (file)
@@ -2140,7 +2140,4 @@ int ubifs_decompress(const void *buf, int len, void *out, int *out_len,
 /* todo: Move these to a common U-Boot header */
 int lzo1x_decompress_safe(const unsigned char *in, size_t in_len,
                          unsigned char *out, size_t *out_len);
-
-int zunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp,
-                                               int stoponerr, int offset);
 #endif /* !__UBIFS_H__ */
index 00b5434..07897f6 100644 (file)
@@ -612,6 +612,11 @@ ulong      usec2ticks    (unsigned long usec);
 ulong  ticks2usec    (unsigned long ticks);
 int    init_timebase (void);
 
+/* lib_generic/gunzip.c */
+int gunzip(void *, int, unsigned char *, unsigned long *);
+int zunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp,
+                                               int stoponerr, int offset);
+
 /* lib_generic/time.c */
 void   udelay        (unsigned long);
 
index d59a448..d2b7ad4 100644 (file)
 #define RESERVED               0xe0
 #define DEFLATED               8
 
-int gunzip(void *, int, unsigned char *, unsigned long *);
 void *zalloc(void *, unsigned, unsigned);
 void zfree(void *, void *, unsigned);
-int zunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp,
-                                               int stoponerr, int offset);
 
 void *zalloc(void *x, unsigned items, unsigned size)
 {