diff options
author | Nikita Kiryanov <nikita@compulab.co.il> | 2014-12-08 17:14:36 +0200 |
---|---|---|
committer | Anatolij Gustschin <agust@denx.de> | 2015-01-10 17:47:59 +0100 |
commit | 3707ad42af9750f1c79098eab3d63e9b6b945886 (patch) | |
tree | 0481902a3d4b996a6f1e483bccdb171acd823009 | |
parent | dc6b5b3a15bd309f818420c1e564b0f5b9b19a3d (diff) | |
download | u-boot-imx-3707ad42af9750f1c79098eab3d63e9b6b945886.zip u-boot-imx-3707ad42af9750f1c79098eab3d63e9b6b945886.tar.gz u-boot-imx-3707ad42af9750f1c79098eab3d63e9b6b945886.tar.bz2 |
lcd: cleanup lcd_drawchars
Remove code duplication from lcd_drawchars().
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | common/lcd.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/common/lcd.c b/common/lcd.c index 70b848c..80923e9 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; |