usb: composite: fix unalinged address about packed structure
[profile/mobile/platform/kernel/u-boot-tm1.git] / common / lcd.c
index ad334ce..7396eaf 100644 (file)
@@ -94,6 +94,7 @@ static int lcd_getbgcolor (void);
 void lcd_setfgcolor (int color);
 static void lcd_setbgcolor (int color);
 
+extern void lcd_display(void);
 
 char lcd_is_enabled = 0;
 
@@ -221,10 +222,13 @@ void lcd_printf(const char *fmt, ...)
 static void lcd_drawchars (ushort x, ushort y, uchar *str, int count)
 {
        uchar *dest;
-       ushort off, row;
+       ushort row;
+
+#if LCD_BPP == LCD_MONOCHROME
+       ushort off  = x * (1 << LCD_BPP) % 8;
+#endif
 
        dest = (uchar *)(lcd_base + y * lcd_line_length + x * (1 << LCD_BPP) / 8);
-       off  = x * (1 << LCD_BPP) % 8;
 
        for (row=0;  row < VIDEO_FONT_HEIGHT;  ++row, dest += lcd_line_length)  {
                uchar *s = str;
@@ -507,7 +511,6 @@ static int lcd_getbgcolor (void)
 void _draw_image(int x, int y, int width, int height, unsigned short *palette, unsigned short *bitmap,
                unsigned int *num_bitmap, unsigned int num_elem, int clear) {
        unsigned long i, j, k, num_pre_pixels, num_post_pixels;
-       unsigned int tmp;
        u16 col16;
        ushort *fb16;
 
@@ -602,10 +605,9 @@ void bitmap_plot (int x, int y, int mode)
 #else
        ushort *cmap;
 #endif
-       ushort i, j;
+       ushort i;
        uchar *bmap;
        uchar *fb;
-       ushort *fb16;
 #if defined CONFIG_PXA250 || defined CONFIG_PXA27X || defined CONFIG_CPU_MONAHANS
        struct pxafb_info *fbi = &panel_info.pxa;
 #elif defined(CONFIG_MPC823)
@@ -706,7 +708,6 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
        unsigned long width, height, byte_width;
        unsigned long pwidth = panel_info.vl_col;
        unsigned colors, bpix, bmp_bpix;
-       unsigned long compression;
 #if defined CONFIG_PXA250 || defined CONFIG_PXA27X || defined CONFIG_CPU_MONAHANS
        struct pxafb_info *fbi = &panel_info.pxa;
 #elif defined(CONFIG_MPC823)
@@ -724,7 +725,6 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
        height = le32_to_cpu (bmp->header.height);
        bmp_bpix = le16_to_cpu(bmp->header.bit_count);
        colors = 1 << bmp_bpix;
-       compression = le32_to_cpu (bmp->header.compression);
 
        bpix = NBITS(panel_info.vl_bpix);