Remove code duplication from lcd_drawchars(). Signed-off-by: Nikita Kiryanov <nik...@compulab.co.il> Cc: Anatolij Gustschin <ag...@denx.de> Cc: Simon Glass <s...@chromium.org> Acked-by: Simon Glass <s...@chromium.org> --- Changes in V3: - No changes.
Changes in V2: - No changes. common/lcd.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/common/lcd.c b/common/lcd.c index c7d597e..22bb488 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -346,19 +346,7 @@ static void lcd_drawchars(ushort x, ushort y, uchar *str, int count) *d++ = rest | (sym >> off); rest = sym << (8-off); -#elif LCD_BPP == LCD_COLOR8 - for (c = 0; c < 8; ++c) { - *d++ = (bits & 0x80) ? - lcd_color_fg : lcd_color_bg; - bits <<= 1; - } -#elif LCD_BPP == LCD_COLOR16 - for (c = 0; c < 8; ++c) { - *d++ = (bits & 0x80) ? - lcd_color_fg : lcd_color_bg; - bits <<= 1; - } -#elif LCD_BPP == LCD_COLOR32 +#else /* LCD_BPP == LCD_COLOR8 or LCD_COLOR16 or LCD_COLOR32 */ for (c = 0; c < 8; ++c) { *d++ = (bits & 0x80) ? lcd_color_fg : lcd_color_bg; -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot