Commit f641471498ddda011f95a840c09907d75259b70a

Authored by Wolfgang Denk
1 parent 6a0766ed22

MCC200: Fix uninitialized variable problem in LCD driver

Showing 2 changed files with 7 additions and 2 deletions Side-by-side Diff

... ... @@ -2,6 +2,8 @@
2 2 Changes since U-Boot 1.1.4:
3 3 ======================================================================
4 4  
  5 +* MCC200: Fix uninitialized variable problem in LCD driver
  6 +
5 7 * Add board/cpu specific NAND chip select function to 440 NDFC
6 8 Based on idea and implementation from Jeff Mann
7 9 Patch by Stefan Roese, 20 Oct 2006
... ... @@ -578,7 +578,9 @@
578 578 */
579 579 int lcd_display_bitmap(ulong bmp_image, int x, int y)
580 580 {
  581 +#if !defined(CONFIG_MCC200)
581 582 ushort *cmap;
  583 +#endif
582 584 ushort i, j;
583 585 uchar *fb;
584 586 bmp_image_t *bmp=(bmp_image_t *)bmp_image;
585 587  
... ... @@ -624,13 +626,13 @@
624 626 debug ("Display-bmp: %d x %d with %d colors\n",
625 627 (int)width, (int)height, (int)colors);
626 628  
  629 +#if !defined(CONFIG_MCC200)
  630 + /* MCC200 LCD doesn't need CMAP, supports 1bpp b&w only */
627 631 if (bpix==8) {
628 632 #if defined(CONFIG_PXA250)
629 633 cmap = (ushort *)fbi->palette;
630 634 #elif defined(CONFIG_MPC823)
631 635 cmap = (ushort *)&(cp->lcd_cmap[255*sizeof(ushort)]);
632   -#elif defined(CONFIG_MCC200)
633   - /* MCC200 LCD doesn't need CMAP, supports 1bpp b&w only */
634 636 #else
635 637 # error "Don't know location of color map"
636 638 #endif
... ... @@ -654,6 +656,7 @@
654 656 #endif
655 657 }
656 658 }
  659 +#endif
657 660  
658 661 /*
659 662 * BMP format for Monochrome assumes that the state of a