From: Ville Syrjala Date: Tue, 4 Mar 2008 22:28:47 +0000 (-0800) Subject: sm501fb: RGB offsets are reversed in 16bpp modes X-Git-Tag: v2.6.25-rc4~63 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=fedbb3625b3c16441de1378ca00a74e9c1733289;p=linux-2.6-omap-h63xx.git sm501fb: RGB offsets are reversed in 16bpp modes The RGB offsets were reversed in 16bpp modes. Simply trying to reverse the offsets when endianness differs is clearly the wrong thing to do but that is an issue for another patch. Signed-off-by: Ville Syrjala Acked-by: Ben Dooks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c index 6e7810d914c..3a98d5a86af 100644 --- a/drivers/video/sm501fb.c +++ b/drivers/video/sm501fb.c @@ -286,13 +286,13 @@ static int sm501fb_check_var(struct fb_var_screeninfo *var, case 16: if (sm->pdata->flags & SM501_FBPD_SWAP_FB_ENDIAN) { - var->red.offset = 11; - var->green.offset = 5; - var->blue.offset = 0; - } else { var->blue.offset = 11; var->green.offset = 5; var->red.offset = 0; + } else { + var->red.offset = 11; + var->green.offset = 5; + var->blue.offset = 0; } var->red.length = 5;