summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/cmd_ximg.c33
-rw-r--r--common/lcd.c8
2 files changed, 19 insertions, 22 deletions
diff --git a/common/cmd_ximg.c b/common/cmd_ximg.c
index 3e5fb44..b34c4d0 100644
--- a/common/cmd_ximg.c
+++ b/common/cmd_ximg.c
@@ -225,20 +225,25 @@ do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
break;
#if defined(CONFIG_BZIP2)
case IH_COMP_BZIP2:
- printf (" Uncompressing part %d ... ", part);
- /*
- * If we've got less than 4 MB of malloc() space,
- * use slower decompression algorithm which requires
- * at most 2300 KB of memory.
- */
- i = BZ2_bzBuffToBuffDecompress
- ((char*)ntohl(hdr->ih_load),
- &unc_len, (char *)data, len,
- CONFIG_SYS_MALLOC_LEN < (4096 * 1024), 0);
- if (i != BZ_OK) {
- printf ("BUNZIP2 ERROR %d - "
- "image not loaded\n", i);
- return 1;
+ {
+ int i;
+
+ printf (" Uncompressing part %d ... ", part);
+ /*
+ * If we've got less than 4 MB of malloc()
+ * space, use slower decompression algorithm
+ * which requires at most 2300 KB of memory.
+ */
+ i = BZ2_bzBuffToBuffDecompress(
+ (char*)ntohl(hdr->ih_load),
+ &unc_len, (char *)data, len,
+ CONFIG_SYS_MALLOC_LEN < (4096 * 1024),
+ 0);
+ if (i != BZ_OK) {
+ printf ("BUNZIP2 ERROR %d - "
+ "image not loaded\n", i);
+ return 1;
+ }
}
break;
#endif /* CONFIG_BZIP2 */
diff --git a/common/lcd.c b/common/lcd.c
index 4e31618..db799db 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -456,22 +456,14 @@ ulong lcd_setmem (ulong addr)
static void lcd_setfgcolor (int color)
{
-#ifdef CONFIG_ATMEL_LCD
lcd_color_fg = color;
-#else
- lcd_color_fg = color & 0x0F;
-#endif
}
/*----------------------------------------------------------------------*/
static void lcd_setbgcolor (int color)
{
-#ifdef CONFIG_ATMEL_LCD
lcd_color_bg = color;
-#else
- lcd_color_bg = color & 0x0F;
-#endif
}
/*----------------------------------------------------------------------*/