Skip to content

Commit

Permalink
Merge tag 'fbdev-fixes-3.13' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/git/tomba/linux

Pull minor fbdev fixes from Tomi Valkeinen.

* tag 'fbdev-fixes-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux:
  video: vt8500: fix error handling in probe()
  atmel_lcdfb: fix module autoload
  fbdev: sh_mobile_meram: Fix defined but not used compiler warnings
  video: kyro: fix incorrect sizes when copying to userspace
  ARM: OMAPFB: panel-sony-acx565akm: fix bad unlock balance
  • Loading branch information
torvalds committed Dec 5, 2013
2 parents 09759d1 + 46ac295 commit 59fb2f0
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 20 deletions.
1 change: 1 addition & 0 deletions drivers/video/atmel_lcdfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ static const struct platform_device_id atmel_lcdfb_devtypes[] = {
/* terminator */
}
};
MODULE_DEVICE_TABLE(platform, atmel_lcdfb_devtypes);

static struct atmel_lcdfb_config *
atmel_lcdfb_get_config(struct platform_device *pdev)
Expand Down
6 changes: 3 additions & 3 deletions drivers/video/kyro/fbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -624,15 +624,15 @@ static int kyrofb_ioctl(struct fb_info *info,
return -EINVAL;
}
case KYRO_IOCTL_UVSTRIDE:
if (copy_to_user(argp, &deviceInfo.ulOverlayUVStride, sizeof(unsigned long)))
if (copy_to_user(argp, &deviceInfo.ulOverlayUVStride, sizeof(deviceInfo.ulOverlayUVStride)))
return -EFAULT;
break;
case KYRO_IOCTL_STRIDE:
if (copy_to_user(argp, &deviceInfo.ulOverlayStride, sizeof(unsigned long)))
if (copy_to_user(argp, &deviceInfo.ulOverlayStride, sizeof(deviceInfo.ulOverlayStride)))
return -EFAULT;
break;
case KYRO_IOCTL_OVERLAY_OFFSET:
if (copy_to_user(argp, &deviceInfo.ulOverlayOffset, sizeof(unsigned long)))
if (copy_to_user(argp, &deviceInfo.ulOverlayOffset, sizeof(deviceInfo.ulOverlayOffset)))
return -EFAULT;
break;
}
Expand Down
5 changes: 2 additions & 3 deletions drivers/video/omap2/displays-new/panel-sony-acx565akm.c
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,8 @@ static int acx565akm_panel_power_on(struct omap_dss_device *dssdev)
struct omap_dss_device *in = ddata->in;
int r;

mutex_lock(&ddata->mutex);

dev_dbg(&ddata->spi->dev, "%s\n", __func__);

in->ops.sdi->set_timings(in, &ddata->videomode);
Expand Down Expand Up @@ -614,10 +616,7 @@ static int acx565akm_enable(struct omap_dss_device *dssdev)
if (omapdss_device_is_enabled(dssdev))
return 0;

mutex_lock(&ddata->mutex);
r = acx565akm_panel_power_on(dssdev);
mutex_unlock(&ddata->mutex);

if (r)
return r;

Expand Down
2 changes: 2 additions & 0 deletions drivers/video/sh_mobile_meram.c
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,7 @@ EXPORT_SYMBOL_GPL(sh_mobile_meram_cache_update);
* Power management
*/

#if defined(CONFIG_PM_SLEEP) || defined(CONFIG_PM_RUNTIME)
static int sh_mobile_meram_suspend(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
Expand Down Expand Up @@ -611,6 +612,7 @@ static int sh_mobile_meram_resume(struct device *dev)
meram_write_reg(priv->base, common_regs[i], priv->regs[i]);
return 0;
}
#endif /* CONFIG_PM_SLEEP || CONFIG_PM_RUNTIME */

static UNIVERSAL_DEV_PM_OPS(sh_mobile_meram_dev_pm_ops,
sh_mobile_meram_suspend,
Expand Down
25 changes: 11 additions & 14 deletions drivers/video/vt8500lcdfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,7 @@ static int vt8500lcd_probe(struct platform_device *pdev)
+ sizeof(u32) * 16, GFP_KERNEL);
if (!fbi) {
dev_err(&pdev->dev, "Failed to initialize framebuffer device\n");
ret = -ENOMEM;
goto failed;
return -ENOMEM;
}

strcpy(fbi->fb.fix.id, "VT8500 LCD");
Expand Down Expand Up @@ -327,15 +326,13 @@ static int vt8500lcd_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (res == NULL) {
dev_err(&pdev->dev, "no I/O memory resource defined\n");
ret = -ENODEV;
goto failed_fbi;
return -ENODEV;
}

res = request_mem_region(res->start, resource_size(res), "vt8500lcd");
if (res == NULL) {
dev_err(&pdev->dev, "failed to request I/O memory\n");
ret = -EBUSY;
goto failed_fbi;
return -EBUSY;
}

fbi->regbase = ioremap(res->start, resource_size(res));
Expand All @@ -346,25 +343,28 @@ static int vt8500lcd_probe(struct platform_device *pdev)
}

disp_timing = of_get_display_timings(pdev->dev.of_node);
if (!disp_timing)
return -EINVAL;
if (!disp_timing) {
ret = -EINVAL;
goto failed_free_io;
}

ret = of_get_fb_videomode(pdev->dev.of_node, &of_mode,
OF_USE_NATIVE_MODE);
if (ret)
return ret;
goto failed_free_io;

ret = of_property_read_u32(pdev->dev.of_node, "bits-per-pixel", &bpp);
if (ret)
return ret;
goto failed_free_io;

/* try allocating the framebuffer */
fb_mem_len = of_mode.xres * of_mode.yres * 2 * (bpp / 8);
fb_mem_virt = dma_alloc_coherent(&pdev->dev, fb_mem_len, &fb_mem_phys,
GFP_KERNEL);
if (!fb_mem_virt) {
pr_err("%s: Failed to allocate framebuffer\n", __func__);
return -ENOMEM;
ret = -ENOMEM;
goto failed_free_io;
}

fbi->fb.fix.smem_start = fb_mem_phys;
Expand Down Expand Up @@ -447,9 +447,6 @@ static int vt8500lcd_probe(struct platform_device *pdev)
iounmap(fbi->regbase);
failed_free_res:
release_mem_region(res->start, resource_size(res));
failed_fbi:
kfree(fbi);
failed:
return ret;
}

Expand Down

0 comments on commit 59fb2f0

Please sign in to comment.