From: Nikita Kiryanov Date: Mon, 8 Dec 2014 15:14:36 +0000 (+0200) Subject: lcd: cleanup lcd_drawchars X-Git-Tag: v2015.04-rc1~86^2~10 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3707ad42af9750f1c79098eab3d63e9b6b945886;p=u-boot lcd: cleanup lcd_drawchars Remove code duplication from lcd_drawchars(). Signed-off-by: Nikita Kiryanov Cc: Anatolij Gustschin Cc: Simon Glass Acked-by: Simon Glass --- diff --git a/common/lcd.c b/common/lcd.c index 70b848c7e9..80923e9118 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;