clean up some #if !defined() in drivers/video/cfb_console.c

rearrange some #if !defined() / #else / #endif statements to remove
the negative logic.

Signed-off-by: Andrew Dyer <adyer@righthandtech.com>
This commit is contained in:
Andrew Dyer 2008-08-29 12:30:39 -05:00 committed by Wolfgang Denk
parent c83f4c2d77
commit cc347801ad

View file

@ -314,10 +314,10 @@ void console_cursor (int state);
#else #else
#define SWAP16(x) (x) #define SWAP16(x) (x)
#define SWAP32(x) (x) #define SWAP32(x) (x)
#if !defined(VIDEO_FB_16BPP_PIXEL_SWAP) #if defined(VIDEO_FB_16BPP_PIXEL_SWAP)
#define SHORTSWAP32(x) (x)
#else
#define SHORTSWAP32(x) ( ((x) >> 16) | ((x) << 16) ) #define SHORTSWAP32(x) ( ((x) >> 16) | ((x) << 16) )
#else
#define SHORTSWAP32(x) (x)
#endif #endif
#endif #endif
@ -932,12 +932,12 @@ int video_display_bitmap (ulong bmp_image, int x, int y)
xcount = width; xcount = width;
while (xcount--) { while (xcount--) {
cte = bmp->color_table[*bmap++]; cte = bmp->color_table[*bmap++];
#if !defined(VIDEO_FB_16BPP_PIXEL_SWAP) #if defined(VIDEO_FB_16BPP_PIXEL_SWAP)
FILL_15BIT_555RGB (cte.red, cte.green, cte.blue);
#else
fill_555rgb_pswap (fb, xpos++, cte.red, fill_555rgb_pswap (fb, xpos++, cte.red,
cte.green, cte.blue); cte.green, cte.blue);
fb += 2; fb += 2;
#else
FILL_15BIT_555RGB (cte.red, cte.green, cte.blue);
#endif #endif
} }
bmap += padded_line; bmap += padded_line;
@ -1006,12 +1006,12 @@ int video_display_bitmap (ulong bmp_image, int x, int y)
WATCHDOG_RESET (); WATCHDOG_RESET ();
xcount = width; xcount = width;
while (xcount--) { while (xcount--) {
#if !defined(VIDEO_FB_16BPP_PIXEL_SWAP) #if defined(VIDEO_FB_16BPP_PIXEL_SWAP)
FILL_15BIT_555RGB (bmap[2], bmap[1], bmap[0]);
#else
fill_555rgb_pswap (fb, xpos++, bmap[2], fill_555rgb_pswap (fb, xpos++, bmap[2],
bmap[1], bmap[0]); bmap[1], bmap[0]);
fb += 2; fb += 2;
#else
FILL_15BIT_555RGB (bmap[2], bmap[1], bmap[0]);
#endif #endif
bmap += 3; bmap += 3;
} }
@ -1136,11 +1136,11 @@ void logo_plot (void *screen, int width, int x, int y)
*dest = ((r >> 5) << 5) | ((g >> 5) << 2) | (b >> 6); *dest = ((r >> 5) << 5) | ((g >> 5) << 2) | (b >> 6);
break; break;
case GDF_15BIT_555RGB: case GDF_15BIT_555RGB:
#if !defined(VIDEO_FB_16BPP_PIXEL_SWAP) #if defined(VIDEO_FB_16BPP_PIXEL_SWAP)
fill_555rgb_pswap (dest, xpos++, r, g, b);
#else
*(unsigned short *) dest = *(unsigned short *) dest =
SWAP16 ((unsigned short) (((r >> 3) << 10) | ((g >> 3) << 5) | (b >> 3))); SWAP16 ((unsigned short) (((r >> 3) << 10) | ((g >> 3) << 5) | (b >> 3)));
#else
fill_555rgb_pswap (dest, xpos++, r, g, b);
#endif #endif
break; break;
case GDF_16BIT_565RGB: case GDF_16BIT_565RGB: