Skip to content

Commit

Permalink
Merge tag 'fbdev-3.11-2' of git://gitorious.org/linux-omap-dss2/linux…
Browse files Browse the repository at this point in the history
… into fbdev/for-next

Various fbdev changes for 3.11

* xilinxfb updates
* Small cleanups and fixes to multiple drivers
  • Loading branch information
Jean-Christophe PLAGNIOL-VILLARD committed Jun 28, 2013
2 parents b75bf98 + 464d8a5 commit 19fd744
Show file tree
Hide file tree
Showing 35 changed files with 113 additions and 136 deletions.
2 changes: 1 addition & 1 deletion drivers/video/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2188,7 +2188,7 @@ config FB_PS3_DEFAULT_SIZE_M

config FB_XILINX
tristate "Xilinx frame buffer support"
depends on FB && (XILINX_VIRTEX || MICROBLAZE)
depends on FB && (XILINX_VIRTEX || MICROBLAZE || ARCH_ZYNQ)
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/aty/aty128fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2016,7 +2016,7 @@ static int aty128_init(struct pci_dev *pdev, const struct pci_device_id *ent)

aty128_init_engine(par);

par->pm_reg = pci_find_capability(pdev, PCI_CAP_ID_PM);
par->pm_reg = pdev->pm_cap;
par->pdev = pdev;
par->asleep = 0;
par->lock_blank = 0;
Expand Down
9 changes: 5 additions & 4 deletions drivers/video/aty/atyfb_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/delay.h>
#include <linux/compiler.h>
#include <linux/console.h>
#include <linux/fb.h>
#include <linux/init.h>
Expand Down Expand Up @@ -434,8 +435,8 @@ static int correct_chipset(struct atyfb_par *par)
const char *name;
int i;

for (i = ARRAY_SIZE(aty_chips) - 1; i >= 0; i--)
if (par->pci_id == aty_chips[i].pci_id)
for (i = ARRAY_SIZE(aty_chips); i > 0; i--)
if (par->pci_id == aty_chips[i - 1].pci_id)
break;

if (i < 0)
Expand Down Expand Up @@ -531,8 +532,8 @@ static int correct_chipset(struct atyfb_par *par)
return 0;
}

static char ram_dram[] = "DRAM";
static char ram_resv[] = "RESV";
static char ram_dram[] __maybe_unused = "DRAM";
static char ram_resv[] __maybe_unused = "RESV";
#ifdef CONFIG_FB_ATY_GX
static char ram_vram[] = "VRAM";
#endif /* CONFIG_FB_ATY_GX */
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/aty/radeon_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2805,7 +2805,7 @@ static void radeonfb_early_resume(void *data)
void radeonfb_pm_init(struct radeonfb_info *rinfo, int dynclk, int ignore_devlist, int force_sleep)
{
/* Find PM registers in config space if any*/
rinfo->pm_reg = pci_find_capability(rinfo->pdev, PCI_CAP_ID_PM);
rinfo->pm_reg = rinfo->pdev->pm_cap;

/* Enable/Disable dynamic clocks: TODO add sysfs access */
if (rinfo->family == CHIP_FAMILY_RS480)
Expand Down
1 change: 0 additions & 1 deletion drivers/video/au1100fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,6 @@ static int au1100fb_drv_probe(struct platform_device *dev)
if (fbdev->info.cmap.len != 0) {
fb_dealloc_cmap(&fbdev->info.cmap);
}
platform_set_drvdata(dev, NULL);

return -ENODEV;
}
Expand Down
1 change: 0 additions & 1 deletion drivers/video/bf54x-lq043fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,6 @@ static int bfin_bf54x_probe(struct platform_device *pdev)
out2:
free_dma(CH_EPPI0);
out1:
platform_set_drvdata(pdev, NULL);

return ret;
}
Expand Down
24 changes: 14 additions & 10 deletions drivers/video/bfin-lq035q1-fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,26 +170,33 @@ static int lq035q1_spidev_remove(struct spi_device *spi)
return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_SHUT);
}

#ifdef CONFIG_PM
static int lq035q1_spidev_suspend(struct spi_device *spi, pm_message_t state)
#ifdef CONFIG_PM_SLEEP
static int lq035q1_spidev_suspend(struct device *dev)
{
struct spi_device *spi = to_spi_device(dev);

return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_SHUT);
}

static int lq035q1_spidev_resume(struct spi_device *spi)
static int lq035q1_spidev_resume(struct device *dev)
{
int ret;
struct spi_device *spi = to_spi_device(dev);
struct spi_control *ctl = spi_get_drvdata(spi);
int ret;

ret = lq035q1_control(spi, LQ035_DRIVER_OUTPUT_CTL, ctl->mode);
if (ret)
return ret;

return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_ON);
}

static SIMPLE_DEV_PM_OPS(lq035q1_spidev_pm_ops, lq035q1_spidev_suspend,
lq035q1_spidev_resume);
#define LQ035Q1_SPIDEV_PM_OPS (&lq035q1_spidev_pm_ops)

#else
# define lq035q1_spidev_suspend NULL
# define lq035q1_spidev_resume NULL
#define LQ035Q1_SPIDEV_PM_OPS NULL
#endif

/* Power down all displays on reboot, poweroff or halt */
Expand Down Expand Up @@ -708,8 +715,7 @@ static int bfin_lq035q1_probe(struct platform_device *pdev)
info->spidrv.probe = lq035q1_spidev_probe;
info->spidrv.remove = lq035q1_spidev_remove;
info->spidrv.shutdown = lq035q1_spidev_shutdown;
info->spidrv.suspend = lq035q1_spidev_suspend;
info->spidrv.resume = lq035q1_spidev_resume;
info->spidrv.driver.pm = LQ035Q1_SPIDEV_PM_OPS;

ret = spi_register_driver(&info->spidrv);
if (ret < 0) {
Expand Down Expand Up @@ -759,7 +765,6 @@ static int bfin_lq035q1_probe(struct platform_device *pdev)
out2:
free_dma(CH_PPI);
out1:
platform_set_drvdata(pdev, NULL);

return ret;
}
Expand Down Expand Up @@ -788,7 +793,6 @@ static int bfin_lq035q1_remove(struct platform_device *pdev)
bfin_lq035q1_free_ports(info->disp_info->ppi_mode ==
USE_RGB565_16_BIT_PPI);

platform_set_drvdata(pdev, NULL);
framebuffer_release(fbinfo);

dev_info(&pdev->dev, "unregistered LCD driver\n");
Expand Down
2 changes: 0 additions & 2 deletions drivers/video/bfin-t350mcqb-fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,6 @@ static int bfin_t350mcqb_probe(struct platform_device *pdev)
out2:
free_dma(CH_PPI);
out1:
platform_set_drvdata(pdev, NULL);

return ret;
}
Expand Down Expand Up @@ -608,7 +607,6 @@ static int bfin_t350mcqb_remove(struct platform_device *pdev)

bfin_t350mcqb_request_ports(0);

platform_set_drvdata(pdev, NULL);
framebuffer_release(fbinfo);

printk(KERN_INFO DRIVER_NAME ": Unregister LCD driver.\n");
Expand Down
2 changes: 0 additions & 2 deletions drivers/video/ep93xx-fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,6 @@ static int ep93xxfb_probe(struct platform_device *pdev)
fb_dealloc_cmap(&info->cmap);
failed_cmap:
kfree(info);
platform_set_drvdata(pdev, NULL);

return err;
}
Expand All @@ -614,7 +613,6 @@ static int ep93xxfb_remove(struct platform_device *pdev)
fbi->mach_info->teardown(pdev);

kfree(info);
platform_set_drvdata(pdev, NULL);

return 0;
}
Expand Down
4 changes: 3 additions & 1 deletion drivers/video/fbmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -1305,7 +1305,9 @@ static int do_fscreeninfo_to_user(struct fb_fix_screeninfo *fix,
err |= copy_to_user(fix32->reserved, fix->reserved,
sizeof(fix->reserved));

return err;
if (err)
return -EFAULT;
return 0;
}

static int fb_get_fscreeninfo(struct fb_info *info, unsigned int cmd,
Expand Down
4 changes: 2 additions & 2 deletions drivers/video/fsl-diu-fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ static enum fsl_diu_monitor_port fsl_diu_name_to_port(const char *s)
unsigned long val;

if (s) {
if (!strict_strtoul(s, 10, &val) && (val <= 2))
if (!kstrtoul(s, 10, &val) && (val <= 2))
port = (enum fsl_diu_monitor_port) val;
else if (strncmp(s, "lvds", 4) == 0)
port = FSL_DIU_PORT_LVDS;
Expand Down Expand Up @@ -1853,7 +1853,7 @@ static int __init fsl_diu_setup(char *options)
if (!strncmp(opt, "monitor=", 8)) {
monitor_port = fsl_diu_name_to_port(opt + 8);
} else if (!strncmp(opt, "bpp=", 4)) {
if (!strict_strtoul(opt + 4, 10, &val))
if (!kstrtoul(opt + 4, 10, &val))
default_bpp = val;
} else
fb_mode = opt;
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/i740fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1302,7 +1302,7 @@ static int __init i740fb_setup(char *options)
}
#endif

int __init i740fb_init(void)
static int __init i740fb_init(void)
{
#ifndef MODULE
char *option = NULL;
Expand Down
7 changes: 2 additions & 5 deletions drivers/video/imxfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,6 @@ static int __init imxfb_probe(struct platform_device *pdev)
failed_req:
kfree(info->pseudo_palette);
failed_init:
platform_set_drvdata(pdev, NULL);
framebuffer_release(info);
return ret;
}
Expand Down Expand Up @@ -955,12 +954,10 @@ static int imxfb_remove(struct platform_device *pdev)
iounmap(fbi->regs);
release_mem_region(res->start, resource_size(res));

platform_set_drvdata(pdev, NULL);

return 0;
}

void imxfb_shutdown(struct platform_device * dev)
static void imxfb_shutdown(struct platform_device *dev)
{
struct fb_info *info = platform_get_drvdata(dev);
struct imxfb_info *fbi = info->par;
Expand Down Expand Up @@ -999,7 +996,7 @@ static int imxfb_setup(void)
return 0;
}

int __init imxfb_init(void)
static int __init imxfb_init(void)
{
int ret = imxfb_setup();

Expand Down
2 changes: 0 additions & 2 deletions drivers/video/jz4740_fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -737,8 +737,6 @@ static int jzfb_remove(struct platform_device *pdev)
fb_dealloc_cmap(&jzfb->fb->cmap);
jzfb_free_devmem(jzfb);

platform_set_drvdata(pdev, NULL);

framebuffer_release(jzfb->fb);

return 0;
Expand Down
1 change: 0 additions & 1 deletion drivers/video/mmp/fb/mmpfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,6 @@ static int mmpfb_probe(struct platform_device *pdev)
mutex_destroy(&fbi->access_ok);
failed:
dev_err(fbi->dev, "mmp-fb: frame buffer device init failed\n");
platform_set_drvdata(pdev, NULL);

framebuffer_release(info);

Expand Down
1 change: 0 additions & 1 deletion drivers/video/mmp/hw/mmp_ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,6 @@ static int mmphw_probe(struct platform_device *pdev)
devm_kfree(ctrl->dev, ctrl);
}

platform_set_drvdata(pdev, NULL);
dev_err(&pdev->dev, "device init failed\n");

return ret;
Expand Down
3 changes: 0 additions & 3 deletions drivers/video/mxsfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,6 @@ static int mxsfb_probe(struct platform_device *pdev)

host->base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(host->base)) {
dev_err(&pdev->dev, "ioremap failed\n");
ret = PTR_ERR(host->base);
goto fb_release;
}
Expand Down Expand Up @@ -986,8 +985,6 @@ static int mxsfb_remove(struct platform_device *pdev)

framebuffer_release(fb_info);

platform_set_drvdata(pdev, NULL);

return 0;
}

Expand Down
1 change: 0 additions & 1 deletion drivers/video/nuc900fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,6 @@ static int nuc900fb_remove(struct platform_device *pdev)
release_resource(fbi->mem);
kfree(fbi->mem);

platform_set_drvdata(pdev, NULL);
framebuffer_release(fbinfo);

return 0;
Expand Down
6 changes: 3 additions & 3 deletions drivers/video/omap2/displays/panel-taal.c
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ static ssize_t taal_store_esd_interval(struct device *dev,
unsigned long t;
int r;

r = strict_strtoul(buf, 10, &t);
r = kstrtoul(buf, 10, &t);
if (r)
return r;

Expand Down Expand Up @@ -611,7 +611,7 @@ static ssize_t taal_store_ulps(struct device *dev,
unsigned long t;
int r;

r = strict_strtoul(buf, 10, &t);
r = kstrtoul(buf, 10, &t);
if (r)
return r;

Expand Down Expand Up @@ -660,7 +660,7 @@ static ssize_t taal_store_ulps_timeout(struct device *dev,
unsigned long t;
int r;

r = strict_strtoul(buf, 10, &t);
r = kstrtoul(buf, 10, &t);
if (r)
return r;

Expand Down
4 changes: 2 additions & 2 deletions drivers/video/omap2/dss/dpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ static bool dpi_calc_dispc_cb(int lckd, int pckd, unsigned long lck,
* shifted. So skip all odd dividers when the pixel clock is on the
* higher side.
*/
if (ctx->pck_min >= 1000000) {
if (ctx->pck_min >= 100000000) {
if (lckd > 1 && lckd % 2 != 0)
return false;

Expand All @@ -158,7 +158,7 @@ static bool dpi_calc_hsdiv_cb(int regm_dispc, unsigned long dispc,
* shifted. So skip all odd dividers when the pixel clock is on the
* higher side.
*/
if (regm_dispc > 1 && regm_dispc % 2 != 0 && ctx->pck_min >= 1000000)
if (regm_dispc > 1 && regm_dispc % 2 != 0 && ctx->pck_min >= 100000000)
return false;

ctx->dsi_cinfo.regm_dispc = regm_dispc;
Expand Down
2 changes: 0 additions & 2 deletions drivers/video/pxa3xx-gcu.c
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,6 @@ static int pxa3xx_gcu_probe(struct platform_device *dev)
misc_deregister(&priv->misc_dev);

err_free_priv:
platform_set_drvdata(dev, NULL);
free_buffers(dev, priv);
kfree(priv);
return ret;
Expand All @@ -729,7 +728,6 @@ static int pxa3xx_gcu_remove(struct platform_device *dev)
priv->shared, priv->shared_phys);
iounmap(priv->mmio_base);
release_mem_region(r->start, resource_size(r));
platform_set_drvdata(dev, NULL);
clk_disable(priv->clk);
free_buffers(dev, priv);
kfree(priv);
Expand Down
1 change: 0 additions & 1 deletion drivers/video/pxafb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2256,7 +2256,6 @@ static int pxafb_probe(struct platform_device *dev)
release_mem_region(r->start, resource_size(r));
failed_fbi:
clk_put(fbi->clk);
platform_set_drvdata(dev, NULL);
kfree(fbi);
failed:
return ret;
Expand Down
2 changes: 0 additions & 2 deletions drivers/video/s3c2410fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,6 @@ static int s3c24xxfb_probe(struct platform_device *pdev,
release_mem:
release_mem_region(res->start, size);
dealloc_fb:
platform_set_drvdata(pdev, NULL);
framebuffer_release(fbinfo);
return ret;
}
Expand Down Expand Up @@ -1051,7 +1050,6 @@ static int s3c2410fb_remove(struct platform_device *pdev)

release_mem_region(info->mem->start, resource_size(info->mem));

platform_set_drvdata(pdev, NULL);
framebuffer_release(fbinfo);

return 0;
Expand Down
1 change: 0 additions & 1 deletion drivers/video/sa1100fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1271,7 +1271,6 @@ static int sa1100fb_probe(struct platform_device *pdev)
failed:
if (fbi)
iounmap(fbi->base);
platform_set_drvdata(pdev, NULL);
kfree(fbi);
release_mem_region(res->start, resource_size(res));
return ret;
Expand Down
1 change: 0 additions & 1 deletion drivers/video/sh7760fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,6 @@ static int sh7760fb_remove(struct platform_device *dev)
iounmap(par->base);
release_mem_region(par->ioarea->start, resource_size(par->ioarea));
framebuffer_release(info);
platform_set_drvdata(dev, NULL);

return 0;
}
Expand Down
1 change: 0 additions & 1 deletion drivers/video/sh_mipi_dsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,6 @@ static int sh_mipi_remove(struct platform_device *pdev)
iounmap(mipi->base);
if (res)
release_mem_region(res->start, resource_size(res));
platform_set_drvdata(pdev, NULL);
kfree(mipi);

return 0;
Expand Down
Loading

0 comments on commit 19fd744

Please sign in to comment.