Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
[pandora-kernel.git] / drivers / video / pxafb.c
index 7b4cd25..bbb0710 100644 (file)
@@ -22,7 +22,6 @@
  *
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/kernel.h>
@@ -232,9 +231,9 @@ static int pxafb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
        if (var->yres < MIN_YRES)
                var->yres = MIN_YRES;
        if (var->xres > fbi->max_xres)
-               var->xres = fbi->max_xres;
+               return -EINVAL;
        if (var->yres > fbi->max_yres)
-               var->yres = fbi->max_yres;
+               return -EINVAL;
        var->xres_virtual =
                max(var->xres_virtual, var->xres);
        var->yres_virtual =
@@ -395,7 +394,7 @@ static int pxafb_blank(int blank, struct fb_info *info)
        return 0;
 }
 
-static int pxafb_mmap(struct fb_info *info, struct file *file,
+static int pxafb_mmap(struct fb_info *info,
                      struct vm_area_struct *vma)
 {
        struct pxafb_info *fbi = (struct pxafb_info *)info;
@@ -781,7 +780,7 @@ static void pxafb_disable_controller(struct pxafb_info *fbi)
        LCCR0 &= ~LCCR0_LDM;    /* Enable LCD Disable Done Interrupt */
        LCCR0 |= LCCR0_DIS;     /* Disable LCD Controller */
 
-       schedule_timeout(20 * HZ / 1000);
+       schedule_timeout(200 * HZ / 1000);
        remove_wait_queue(&fbi->ctrlr_wait, &wait);
 
        /* disable LCD controller clock */
@@ -1274,7 +1273,7 @@ int __init pxafb_probe(struct platform_device *dev)
        struct pxafb_mach_info *inf;
        int ret;
 
-       dev_dbg(dev, "pxafb_probe\n");
+       dev_dbg(&dev->dev, "pxafb_probe\n");
 
        inf = dev->dev.platform_data;
        ret = -ENOMEM;
@@ -1335,7 +1334,7 @@ int __init pxafb_probe(struct platform_device *dev)
                goto failed;
        }
 
-       ret = request_irq(IRQ_LCD, pxafb_handle_irq, SA_INTERRUPT, "LCD", fbi);
+       ret = request_irq(IRQ_LCD, pxafb_handle_irq, IRQF_DISABLED, "LCD", fbi);
        if (ret) {
                dev_err(&dev->dev, "request_irq failed: %d\n", ret);
                ret = -EBUSY;
@@ -1396,7 +1395,8 @@ static struct platform_driver pxafb_driver = {
 int __devinit pxafb_setup(char *options)
 {
 # ifdef CONFIG_FB_PXA_PARAMETERS
-       strlcpy(g_options, options, sizeof(g_options));
+       if (options)
+               strlcpy(g_options, options, sizeof(g_options));
 # endif
        return 0;
 }