Merge omapdss topic branch for fbdev 4.1
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 20 Apr 2015 09:09:31 +0000 (12:09 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 20 Apr 2015 09:09:31 +0000 (12:09 +0300)
drivers/video/fbdev/hyperv_fb.c
drivers/video/fbdev/imxfb.c
drivers/video/fbdev/pm3fb.c
drivers/video/fbdev/pxafb.c
drivers/video/fbdev/sh_mobile_lcdcfb.c
drivers/video/fbdev/sm501fb.c
drivers/video/fbdev/via/via_clock.c

index 42543362f16308b3b6b0fdbffb287e98bf33d14d..807ee22ef2292204eb85dc6e3bce75d0f9fbe74c 100644 (file)
@@ -415,7 +415,8 @@ static int synthvid_negotiate_ver(struct hv_device *hdev, u32 ver)
        struct fb_info *info = hv_get_drvdata(hdev);
        struct hvfb_par *par = info->par;
        struct synthvid_msg *msg = (struct synthvid_msg *)par->init_buf;
-       int t, ret = 0;
+       int ret = 0;
+       unsigned long t;
 
        memset(msg, 0, sizeof(struct synthvid_msg));
        msg->vid_hdr.type = SYNTHVID_VERSION_REQUEST;
@@ -488,7 +489,8 @@ static int synthvid_send_config(struct hv_device *hdev)
        struct fb_info *info = hv_get_drvdata(hdev);
        struct hvfb_par *par = info->par;
        struct synthvid_msg *msg = (struct synthvid_msg *)par->init_buf;
-       int t, ret = 0;
+       int ret = 0;
+       unsigned long t;
 
        /* Send VRAM location */
        memset(msg, 0, sizeof(struct synthvid_msg));
index 3b6a3c8c36e295e3cad7870643479bfa3f61bfbd..84d1d29e532cb6ceed4c698b16e249dc69476c36 100644 (file)
@@ -183,7 +183,7 @@ static struct platform_device_id imxfb_devtype[] = {
 };
 MODULE_DEVICE_TABLE(platform, imxfb_devtype);
 
-static struct of_device_id imxfb_of_dev_id[] = {
+static const struct of_device_id imxfb_of_dev_id[] = {
        {
                .compatible = "fsl,imx1-fb",
                .data = &imxfb_devtype[IMX1_FB],
index 4bf3273d0433a3cfb34b0633875f3dceb7dbee27..77b99ed39ad0935856398a1921b626e64e069a50 100644 (file)
@@ -1479,9 +1479,9 @@ static void pm3fb_remove(struct pci_dev *dev)
                fb_dealloc_cmap(&info->cmap);
 
 #ifdef CONFIG_MTRR
-       if (par->mtrr_handle >= 0)
-               mtrr_del(par->mtrr_handle, info->fix.smem_start,
-                        info->fix.smem_len);
+               if (par->mtrr_handle >= 0)
+                       mtrr_del(par->mtrr_handle, info->fix.smem_start,
+                                info->fix.smem_len);
 #endif /* CONFIG_MTRR */
                iounmap(info->screen_base);
                release_mem_region(fix->smem_start, fix->smem_len);
index da2431eda2fde0da4fe0948fb6ade83abba01590..7245611ec96398935b7194d819ee021dd9ad2293 100644 (file)
@@ -1285,7 +1285,7 @@ static int pxafb_smart_thread(void *arg)
                mutex_unlock(&fbi->ctrlr_lock);
 
                set_current_state(TASK_INTERRUPTIBLE);
-               schedule_timeout(30 * HZ / 1000);
+               schedule_timeout(msecs_to_jiffies(30));
        }
 
        pr_debug("%s(): task ending\n", __func__);
@@ -1460,7 +1460,7 @@ static void pxafb_disable_controller(struct pxafb_info *fbi)
 #ifdef CONFIG_FB_PXA_SMARTPANEL
        if (fbi->lccr0 & LCCR0_LCDT) {
                wait_for_completion_timeout(&fbi->refresh_done,
-                               200 * HZ / 1000);
+                               msecs_to_jiffies(200));
                return;
        }
 #endif
@@ -1472,7 +1472,7 @@ static void pxafb_disable_controller(struct pxafb_info *fbi)
        lcd_writel(fbi, LCCR0, lccr0);
        lcd_writel(fbi, LCCR0, lccr0 | LCCR0_DIS);
 
-       wait_for_completion_timeout(&fbi->disable_done, 200 * HZ / 1000);
+       wait_for_completion_timeout(&fbi->disable_done, msecs_to_jiffies(200));
 
        /* disable LCD controller clock */
        clk_disable_unprepare(fbi->clk);
index d3013cd9f976966330cd7b501e86e934f1493794..82c0a8caa9b851126402b27a88a5d41ea9fc7386 100644 (file)
@@ -1461,7 +1461,7 @@ overlay_rop3_store(struct device *dev, struct device_attribute *attr,
        unsigned int rop3;
        char *endp;
 
-       rop3 = !!simple_strtoul(buf, &endp, 10);
+       rop3 = simple_strtoul(buf, &endp, 10);
        if (isspace(*endp))
                endp++;
 
@@ -2605,7 +2605,6 @@ sh_mobile_lcdc_channel_init(struct sh_mobile_lcdc_chan *ch)
        unsigned int max_size;
        unsigned int i;
 
-       mutex_init(&ch->open_lock);
        ch->notify = sh_mobile_lcdc_display_notify;
 
        /* Validate the format. */
@@ -2704,7 +2703,7 @@ static int sh_mobile_lcdc_probe(struct platform_device *pdev)
        struct resource *res;
        int num_channels;
        int error;
-       int i;
+       int irq, i;
 
        if (!pdata) {
                dev_err(&pdev->dev, "no platform data defined\n");
@@ -2712,8 +2711,8 @@ static int sh_mobile_lcdc_probe(struct platform_device *pdev)
        }
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       i = platform_get_irq(pdev, 0);
-       if (!res || i < 0) {
+       irq = platform_get_irq(pdev, 0);
+       if (!res || irq < 0) {
                dev_err(&pdev->dev, "cannot get platform resources\n");
                return -ENOENT;
        }
@@ -2726,16 +2725,18 @@ static int sh_mobile_lcdc_probe(struct platform_device *pdev)
 
        priv->dev = &pdev->dev;
        priv->meram_dev = pdata->meram_dev;
+       for (i = 0; i < ARRAY_SIZE(priv->ch); i++)
+               mutex_init(&priv->ch[i].open_lock);
        platform_set_drvdata(pdev, priv);
 
-       error = request_irq(i, sh_mobile_lcdc_irq, 0,
+       error = request_irq(irq, sh_mobile_lcdc_irq, 0,
                            dev_name(&pdev->dev), priv);
        if (error) {
                dev_err(&pdev->dev, "unable to request irq\n");
                goto err1;
        }
 
-       priv->irq = i;
+       priv->irq = irq;
        atomic_set(&priv->hw_usecnt, -1);
 
        for (i = 0, num_channels = 0; i < ARRAY_SIZE(pdata->ch); i++) {
index e8d4121783fb09b4f4ffcb2f12b035545c1c6cb6..d0a4e2f79a5703c3b0ed1b968fcac40f43052968 100644 (file)
@@ -1606,7 +1606,7 @@ static int sm501fb_start(struct sm501fb_info *info,
        info->fbmem_len = resource_size(res);
 
        /* clear framebuffer memory - avoids garbage data on unused fb */
-       memset(info->fbmem, 0, info->fbmem_len);
+       memset_io(info->fbmem, 0, info->fbmem_len);
 
        /* clear palette ram - undefined at power on */
        for (k = 0; k < (256 * 3); k++)
index db1e39277e321f37a39b690d4f6f0d5638325376..bf269fa43977e6d7a83dda2269b2d191a08221ef 100644 (file)
@@ -30,7 +30,7 @@
 #include "global.h"
 #include "debug.h"
 
-const char *via_slap = "Please slap VIA Technologies to motivate them "
+static const char *via_slap = "Please slap VIA Technologies to motivate them "
        "releasing full documentation for your platform!\n";
 
 static inline u32 cle266_encode_pll(struct via_pll_config pll)