From: Simon Glass Date: Wed, 15 Oct 2014 10:53:04 +0000 (-0600) Subject: lcd: Fix build error with CONFIG_LCD_BMP_RLE8 X-Git-Tag: KARO-TXA5-2015-06-26~537 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0156444cf7e77e92fed7a61d6c6123b349f1d600;p=karo-tx-uboot.git lcd: Fix build error with CONFIG_LCD_BMP_RLE8 Add a block to avoid a build error with the variable declaration. Enable the option on sandbox to prevent an error being introduced in future. Signed-off-by: Simon Glass --- diff --git a/common/lcd.c b/common/lcd.c index 217ec9dbd2..689d30eb25 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -1023,7 +1023,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y) switch (bmp_bpix) { case 1: /* pass through */ - case 8: + case 8: { #ifdef CONFIG_LCD_BMP_RLE8 u32 compression = get_unaligned_le32(&bmp->header.compression); if (compression == BMP_BI_RLE8) { @@ -1056,7 +1056,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y) fb -= byte_width + lcd_line_length; } break; - + } #if defined(CONFIG_BMP_16BPP) case 16: for (i = 0; i < height; ++i) { diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h index 69726432a3..022629f522 100644 --- a/include/configs/sandbox.h +++ b/include/configs/sandbox.h @@ -172,6 +172,7 @@ #define CONFIG_CONSOLE_MUX #define CONFIG_SYS_CONSOLE_IS_IN_ENV #define LCD_BPP LCD_COLOR16 +#define CONFIG_LCD_BMP_RLE8 #define CONFIG_CROS_EC_KEYB #define CONFIG_KEYBOARD