[PATCH] ARM: AMBA CLCD: program palette for pseudocolor visuals
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Sat, 30 Apr 2005 21:39:51 +0000 (22:39 +0100)
committerRussell King <rmk@dyn-67.arm.linux.org.uk>
Sat, 30 Apr 2005 21:39:51 +0000 (22:39 +0100)
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
drivers/video/amba-clcd.c

index 3e386fd4c5c6e627699ccd04117b712030f0f3f4..2896a380d4ea902d88f3831d23e847f63ffcf7c3 100644 (file)
@@ -256,7 +256,7 @@ clcdfb_setcolreg(unsigned int regno, unsigned int red, unsigned int green,
                                  convert_bitfield(green, &fb->fb.var.green) |
                                  convert_bitfield(red, &fb->fb.var.red);
 
-       if (fb->fb.var.bits_per_pixel == 8 && regno < 256) {
+       if (fb->fb.fix.visual == FB_VISUAL_PSEUDOCOLOR && regno < 256) {
                int hw_reg = CLCD_PALETTE + ((regno * 2) & ~3);
                u32 val, mask, newval;