]> err.no Git - linux-2.6/blobdiff - drivers/video/amba-clcd.c
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
[linux-2.6] / drivers / video / amba-clcd.c
index 3e386fd4c5c6e627699ccd04117b712030f0f3f4..a3c2c45e29e03e7d9e42a64036501904305ee4df 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/ioport.h>
 #include <linux/list.h>
 
+#include <asm/sizes.h>
 #include <asm/hardware/amba.h>
 #include <asm/hardware/clock.h>
 
@@ -134,16 +135,16 @@ clcdfb_set_bitfields(struct clcd_fb *fb, struct fb_var_screeninfo *var)
                break;
        case 16:
                var->red.length         = 5;
-               var->green.length       = 5;
+               var->green.length       = 6;
                var->blue.length        = 5;
                if (fb->panel->cntl & CNTL_BGR) {
-                       var->red.offset         = 10;
+                       var->red.offset         = 11;
                        var->green.offset       = 5;
                        var->blue.offset        = 0;
                } else {
                        var->red.offset         = 0;
                        var->green.offset       = 5;
-                       var->blue.offset        = 10;
+                       var->blue.offset        = 11;
                }
                break;
        case 32:
@@ -256,7 +257,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;
 
@@ -332,7 +333,6 @@ static struct fb_ops clcdfb_ops = {
        .fb_fillrect    = cfb_fillrect,
        .fb_copyarea    = cfb_copyarea,
        .fb_imageblit   = cfb_imageblit,
-       .fb_cursor      = soft_cursor,
        .fb_mmap        = clcdfb_mmap,
 };
 
@@ -504,21 +504,21 @@ static int clcdfb_remove(struct amba_device *dev)
 static struct amba_id clcdfb_id_table[] = {
        {
                .id     = 0x00041110,
-               .mask   = 0x000fffff,
+               .mask   = 0x000ffffe,
        },
        { 0, 0 },
 };
 
 static struct amba_driver clcd_driver = {
        .drv            = {
-               .name   = "clcd-pl110",
+               .name   = "clcd-pl11x",
        },
        .probe          = clcdfb_probe,
        .remove         = clcdfb_remove,
        .id_table       = clcdfb_id_table,
 };
 
-int __init amba_clcdfb_init(void)
+static int __init amba_clcdfb_init(void)
 {
        if (fb_get_options("ambafb", NULL))
                return -ENODEV;