diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-12-05 12:55:20 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-12-05 12:55:20 -0500 |
| commit | 59fb2f0e9e30ad99a8bab0ff1efaf8f4a3b7105f (patch) | |
| tree | 68b061060b2085c8502592f72f76180d01eceeb9 | |
| parent | 09759d1e13e06c2f6346b1b3285fbde2c1e794c6 (diff) | |
| parent | 46ac29568e63c9da9c15804648d3ed8c25e2dc44 (diff) | |
Merge tag 'fbdev-fixes-3.13' of git://git.kernel.org/pub/scm/linux/kernel/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
| -rw-r--r-- | drivers/video/atmel_lcdfb.c | 1 | ||||
| -rw-r--r-- | drivers/video/kyro/fbdev.c | 6 | ||||
| -rw-r--r-- | drivers/video/omap2/displays-new/panel-sony-acx565akm.c | 5 | ||||
| -rw-r--r-- | drivers/video/sh_mobile_meram.c | 2 | ||||
| -rw-r--r-- | drivers/video/vt8500lcdfb.c | 25 |
5 files changed, 19 insertions, 20 deletions
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c index 8521051cf946..cd961622f9c1 100644 --- a/drivers/video/atmel_lcdfb.c +++ b/drivers/video/atmel_lcdfb.c | |||
| @@ -131,6 +131,7 @@ static const struct platform_device_id atmel_lcdfb_devtypes[] = { | |||
| 131 | /* terminator */ | 131 | /* terminator */ |
| 132 | } | 132 | } |
| 133 | }; | 133 | }; |
| 134 | MODULE_DEVICE_TABLE(platform, atmel_lcdfb_devtypes); | ||
| 134 | 135 | ||
| 135 | static struct atmel_lcdfb_config * | 136 | static struct atmel_lcdfb_config * |
| 136 | atmel_lcdfb_get_config(struct platform_device *pdev) | 137 | atmel_lcdfb_get_config(struct platform_device *pdev) |
diff --git a/drivers/video/kyro/fbdev.c b/drivers/video/kyro/fbdev.c index 50c857477e4f..65041e15fd59 100644 --- a/drivers/video/kyro/fbdev.c +++ b/drivers/video/kyro/fbdev.c | |||
| @@ -624,15 +624,15 @@ static int kyrofb_ioctl(struct fb_info *info, | |||
| 624 | return -EINVAL; | 624 | return -EINVAL; |
| 625 | } | 625 | } |
| 626 | case KYRO_IOCTL_UVSTRIDE: | 626 | case KYRO_IOCTL_UVSTRIDE: |
| 627 | if (copy_to_user(argp, &deviceInfo.ulOverlayUVStride, sizeof(unsigned long))) | 627 | if (copy_to_user(argp, &deviceInfo.ulOverlayUVStride, sizeof(deviceInfo.ulOverlayUVStride))) |
| 628 | return -EFAULT; | 628 | return -EFAULT; |
| 629 | break; | 629 | break; |
| 630 | case KYRO_IOCTL_STRIDE: | 630 | case KYRO_IOCTL_STRIDE: |
| 631 | if (copy_to_user(argp, &deviceInfo.ulOverlayStride, sizeof(unsigned long))) | 631 | if (copy_to_user(argp, &deviceInfo.ulOverlayStride, sizeof(deviceInfo.ulOverlayStride))) |
| 632 | return -EFAULT; | 632 | return -EFAULT; |
| 633 | break; | 633 | break; |
| 634 | case KYRO_IOCTL_OVERLAY_OFFSET: | 634 | case KYRO_IOCTL_OVERLAY_OFFSET: |
| 635 | if (copy_to_user(argp, &deviceInfo.ulOverlayOffset, sizeof(unsigned long))) | 635 | if (copy_to_user(argp, &deviceInfo.ulOverlayOffset, sizeof(deviceInfo.ulOverlayOffset))) |
| 636 | return -EFAULT; | 636 | return -EFAULT; |
| 637 | break; | 637 | break; |
| 638 | } | 638 | } |
diff --git a/drivers/video/omap2/displays-new/panel-sony-acx565akm.c b/drivers/video/omap2/displays-new/panel-sony-acx565akm.c index e6d56f714ae4..d94f35dbd536 100644 --- a/drivers/video/omap2/displays-new/panel-sony-acx565akm.c +++ b/drivers/video/omap2/displays-new/panel-sony-acx565akm.c | |||
| @@ -526,6 +526,8 @@ static int acx565akm_panel_power_on(struct omap_dss_device *dssdev) | |||
| 526 | struct omap_dss_device *in = ddata->in; | 526 | struct omap_dss_device *in = ddata->in; |
| 527 | int r; | 527 | int r; |
| 528 | 528 | ||
| 529 | mutex_lock(&ddata->mutex); | ||
| 530 | |||
| 529 | dev_dbg(&ddata->spi->dev, "%s\n", __func__); | 531 | dev_dbg(&ddata->spi->dev, "%s\n", __func__); |
| 530 | 532 | ||
| 531 | in->ops.sdi->set_timings(in, &ddata->videomode); | 533 | in->ops.sdi->set_timings(in, &ddata->videomode); |
| @@ -614,10 +616,7 @@ static int acx565akm_enable(struct omap_dss_device *dssdev) | |||
| 614 | if (omapdss_device_is_enabled(dssdev)) | 616 | if (omapdss_device_is_enabled(dssdev)) |
| 615 | return 0; | 617 | return 0; |
| 616 | 618 | ||
| 617 | mutex_lock(&ddata->mutex); | ||
| 618 | r = acx565akm_panel_power_on(dssdev); | 619 | r = acx565akm_panel_power_on(dssdev); |
| 619 | mutex_unlock(&ddata->mutex); | ||
| 620 | |||
| 621 | if (r) | 620 | if (r) |
| 622 | return r; | 621 | return r; |
| 623 | 622 | ||
diff --git a/drivers/video/sh_mobile_meram.c b/drivers/video/sh_mobile_meram.c index e0f098562a74..a297de5cc859 100644 --- a/drivers/video/sh_mobile_meram.c +++ b/drivers/video/sh_mobile_meram.c | |||
| @@ -569,6 +569,7 @@ EXPORT_SYMBOL_GPL(sh_mobile_meram_cache_update); | |||
| 569 | * Power management | 569 | * Power management |
| 570 | */ | 570 | */ |
| 571 | 571 | ||
| 572 | #if defined(CONFIG_PM_SLEEP) || defined(CONFIG_PM_RUNTIME) | ||
| 572 | static int sh_mobile_meram_suspend(struct device *dev) | 573 | static int sh_mobile_meram_suspend(struct device *dev) |
| 573 | { | 574 | { |
| 574 | struct platform_device *pdev = to_platform_device(dev); | 575 | struct platform_device *pdev = to_platform_device(dev); |
| @@ -611,6 +612,7 @@ static int sh_mobile_meram_resume(struct device *dev) | |||
| 611 | meram_write_reg(priv->base, common_regs[i], priv->regs[i]); | 612 | meram_write_reg(priv->base, common_regs[i], priv->regs[i]); |
| 612 | return 0; | 613 | return 0; |
| 613 | } | 614 | } |
| 615 | #endif /* CONFIG_PM_SLEEP || CONFIG_PM_RUNTIME */ | ||
| 614 | 616 | ||
| 615 | static UNIVERSAL_DEV_PM_OPS(sh_mobile_meram_dev_pm_ops, | 617 | static UNIVERSAL_DEV_PM_OPS(sh_mobile_meram_dev_pm_ops, |
| 616 | sh_mobile_meram_suspend, | 618 | sh_mobile_meram_suspend, |
diff --git a/drivers/video/vt8500lcdfb.c b/drivers/video/vt8500lcdfb.c index b30e5a439d1f..a8f2b280f796 100644 --- a/drivers/video/vt8500lcdfb.c +++ b/drivers/video/vt8500lcdfb.c | |||
| @@ -293,8 +293,7 @@ static int vt8500lcd_probe(struct platform_device *pdev) | |||
| 293 | + sizeof(u32) * 16, GFP_KERNEL); | 293 | + sizeof(u32) * 16, GFP_KERNEL); |
| 294 | if (!fbi) { | 294 | if (!fbi) { |
| 295 | dev_err(&pdev->dev, "Failed to initialize framebuffer device\n"); | 295 | dev_err(&pdev->dev, "Failed to initialize framebuffer device\n"); |
| 296 | ret = -ENOMEM; | 296 | return -ENOMEM; |
| 297 | goto failed; | ||
| 298 | } | 297 | } |
| 299 | 298 | ||
| 300 | strcpy(fbi->fb.fix.id, "VT8500 LCD"); | 299 | strcpy(fbi->fb.fix.id, "VT8500 LCD"); |
| @@ -327,15 +326,13 @@ static int vt8500lcd_probe(struct platform_device *pdev) | |||
| 327 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 326 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
| 328 | if (res == NULL) { | 327 | if (res == NULL) { |
| 329 | dev_err(&pdev->dev, "no I/O memory resource defined\n"); | 328 | dev_err(&pdev->dev, "no I/O memory resource defined\n"); |
| 330 | ret = -ENODEV; | 329 | return -ENODEV; |
| 331 | goto failed_fbi; | ||
| 332 | } | 330 | } |
| 333 | 331 | ||
| 334 | res = request_mem_region(res->start, resource_size(res), "vt8500lcd"); | 332 | res = request_mem_region(res->start, resource_size(res), "vt8500lcd"); |
| 335 | if (res == NULL) { | 333 | if (res == NULL) { |
| 336 | dev_err(&pdev->dev, "failed to request I/O memory\n"); | 334 | dev_err(&pdev->dev, "failed to request I/O memory\n"); |
| 337 | ret = -EBUSY; | 335 | return -EBUSY; |
| 338 | goto failed_fbi; | ||
| 339 | } | 336 | } |
| 340 | 337 | ||
| 341 | fbi->regbase = ioremap(res->start, resource_size(res)); | 338 | fbi->regbase = ioremap(res->start, resource_size(res)); |
| @@ -346,17 +343,19 @@ static int vt8500lcd_probe(struct platform_device *pdev) | |||
| 346 | } | 343 | } |
| 347 | 344 | ||
| 348 | disp_timing = of_get_display_timings(pdev->dev.of_node); | 345 | disp_timing = of_get_display_timings(pdev->dev.of_node); |
| 349 | if (!disp_timing) | 346 | if (!disp_timing) { |
| 350 | return -EINVAL; | 347 | ret = -EINVAL; |
| 348 | goto failed_free_io; | ||
| 349 | } | ||
| 351 | 350 | ||
| 352 | ret = of_get_fb_videomode(pdev->dev.of_node, &of_mode, | 351 | ret = of_get_fb_videomode(pdev->dev.of_node, &of_mode, |
| 353 | OF_USE_NATIVE_MODE); | 352 | OF_USE_NATIVE_MODE); |
| 354 | if (ret) | 353 | if (ret) |
| 355 | return ret; | 354 | goto failed_free_io; |
| 356 | 355 | ||
| 357 | ret = of_property_read_u32(pdev->dev.of_node, "bits-per-pixel", &bpp); | 356 | ret = of_property_read_u32(pdev->dev.of_node, "bits-per-pixel", &bpp); |
| 358 | if (ret) | 357 | if (ret) |
| 359 | return ret; | 358 | goto failed_free_io; |
| 360 | 359 | ||
| 361 | /* try allocating the framebuffer */ | 360 | /* try allocating the framebuffer */ |
| 362 | fb_mem_len = of_mode.xres * of_mode.yres * 2 * (bpp / 8); | 361 | fb_mem_len = of_mode.xres * of_mode.yres * 2 * (bpp / 8); |
| @@ -364,7 +363,8 @@ static int vt8500lcd_probe(struct platform_device *pdev) | |||
| 364 | GFP_KERNEL); | 363 | GFP_KERNEL); |
| 365 | if (!fb_mem_virt) { | 364 | if (!fb_mem_virt) { |
| 366 | pr_err("%s: Failed to allocate framebuffer\n", __func__); | 365 | pr_err("%s: Failed to allocate framebuffer\n", __func__); |
| 367 | return -ENOMEM; | 366 | ret = -ENOMEM; |
| 367 | goto failed_free_io; | ||
| 368 | } | 368 | } |
| 369 | 369 | ||
| 370 | fbi->fb.fix.smem_start = fb_mem_phys; | 370 | fbi->fb.fix.smem_start = fb_mem_phys; |
| @@ -447,9 +447,6 @@ failed_free_io: | |||
| 447 | iounmap(fbi->regbase); | 447 | iounmap(fbi->regbase); |
| 448 | failed_free_res: | 448 | failed_free_res: |
| 449 | release_mem_region(res->start, resource_size(res)); | 449 | release_mem_region(res->start, resource_size(res)); |
| 450 | failed_fbi: | ||
| 451 | kfree(fbi); | ||
| 452 | failed: | ||
| 453 | return ret; | ||
