Merge Linus' tree.
[safe/jmp/linux-2.6] / drivers / video / amba-clcd.c
index cde6fd8..0da4083 100644 (file)
 #include <linux/init.h>
 #include <linux/ioport.h>
 #include <linux/list.h>
+#include <linux/amba/bus.h>
+#include <linux/amba/clcd.h>
+#include <linux/clk.h>
 
 #include <asm/sizes.h>
-#include <asm/hardware/amba.h>
-#include <asm/hardware/clock.h>
-
-#include <asm/hardware/amba_clcd.h>
 
 #define to_clcd(info)  container_of(info, struct clcd_fb, fb)
 
@@ -333,7 +332,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,
 };
 
@@ -347,10 +345,6 @@ static int clcdfb_register(struct clcd_fb *fb)
                goto out;
        }
 
-       ret = clk_use(fb->clk);
-       if (ret)
-               goto free_clk;
-
        fb->fb.fix.mmio_start   = fb->dev->res.start;
        fb->fb.fix.mmio_len     = SZ_4K;
 
@@ -358,7 +352,7 @@ static int clcdfb_register(struct clcd_fb *fb)
        if (!fb->regs) {
                printk(KERN_ERR "CLCD: unable to remap registers\n");
                ret = -ENOMEM;
-               goto unuse_clk;
+               goto free_clk;
        }
 
        fb->fb.fbops            = &clcdfb_ops;
@@ -428,8 +422,6 @@ static int clcdfb_register(struct clcd_fb *fb)
        printk(KERN_ERR "CLCD: cannot register framebuffer (%d)\n", ret);
 
        iounmap(fb->regs);
- unuse_clk:
-       clk_unuse(fb->clk);
  free_clk:
        clk_put(fb->clk);
  out:
@@ -490,7 +482,6 @@ static int clcdfb_remove(struct amba_device *dev)
        clcdfb_disable(fb);
        unregister_framebuffer(&fb->fb);
        iounmap(fb->regs);
-       clk_unuse(fb->clk);
        clk_put(fb->clk);
 
        fb->board->remove(fb);
@@ -505,21 +496,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;