mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
common/lcd.c: use ARRAY_SIZE
Use available macro for obtaining the size of bmp_logo_palette[] Signed-off-by: Anatolij Gustschin <agust@denx.de>
This commit is contained in:
parent
de3b49c4dd
commit
095407da56
1 changed files with 2 additions and 2 deletions
|
@ -523,7 +523,7 @@ void bitmap_plot (int x, int y)
|
||||||
|
|
||||||
debug ("Logo: width %d height %d colors %d cmap %d\n",
|
debug ("Logo: width %d height %d colors %d cmap %d\n",
|
||||||
BMP_LOGO_WIDTH, BMP_LOGO_HEIGHT, BMP_LOGO_COLORS,
|
BMP_LOGO_WIDTH, BMP_LOGO_HEIGHT, BMP_LOGO_COLORS,
|
||||||
(int)(sizeof(bmp_logo_palette)/(sizeof(ushort))));
|
ARRAY_SIZE(bmp_logo_palette));
|
||||||
|
|
||||||
bmap = &bmp_logo_bitmap[0];
|
bmap = &bmp_logo_bitmap[0];
|
||||||
fb = (uchar *)(lcd_base + y * lcd_line_length + x);
|
fb = (uchar *)(lcd_base + y * lcd_line_length + x);
|
||||||
|
@ -548,7 +548,7 @@ void bitmap_plot (int x, int y)
|
||||||
WATCHDOG_RESET();
|
WATCHDOG_RESET();
|
||||||
|
|
||||||
/* Set color map */
|
/* Set color map */
|
||||||
for (i=0; i<(sizeof(bmp_logo_palette)/(sizeof(ushort))); ++i) {
|
for (i = 0; i < ARRAY_SIZE(bmp_logo_palette); ++i) {
|
||||||
ushort colreg = bmp_logo_palette[i];
|
ushort colreg = bmp_logo_palette[i];
|
||||||
#ifdef CONFIG_ATMEL_LCD
|
#ifdef CONFIG_ATMEL_LCD
|
||||||
uint lut_entry;
|
uint lut_entry;
|
||||||
|
|
Loading…
Reference in a new issue