Small fbdev fixes for various fb drivers

-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJSRUnwAAoJEPo9qoy8lh71kCQP/2UySAFblZO/dI2r+qYaeKXu
 bWM95nUcFnGdSEz2TqsV2bPjoUl3WihHilwVYrMNhbah1XeCZtZOkWEdF0k2uIM/
 KZ2A5baWbx+QX7UuYJ4dHRpnVI5O93uF1V6o9AwJ+1IqExWq+ubER8cYL9oduXog
 B2bJqU1uBz8uqtKcrd4JdXP5nMioEKS6f7npuaDTv/nPixKK6f6EqSXpAzsseOdd
 TiUqe0cjWehDxLjRHGh4CysHD79To01/zEOH0/hChIpiB8TXHJvKxROfDNxNLaLk
 w2MYRA0IoDQhul9cyQPTRCI3V4HVwBbOW7x/KwiVuCMbdqHG8kFWmOZVE2Ojbz90
 nb9DhHDgOWuUnvEC7N0Ns9cdoyTD/ZmnqgUVdbEK9Xkw5FFEWYdFwd3y9ie6zFwp
 syN+tJMC7KLBOJYyux6gC3EYYzUcu+UVkpUQ5tdFZ2LgkUUKpkWtnAaxW5zOMyTi
 R6/sBo2I90cQ2reXTaZQv8y7NtZzE5V3x/aLk5at0k1wMkCLJvzEBJkHWLAQFxt4
 qKqr7l3gmQIkleWHNkt+0s9egBBnyXoiEIoP4FmHHHP5KEwB6vJZqIy5Ej2/o0Yz
 KEMt4GWtOqKozKOTFewrDDTjTJmkcPl4DyRa7bUyNbTVL5hQ42SiMMprM2IHUNKI
 bQNzhNsxhVE8TQ2ZheTI
 =Z6EB
 -----END PGP SIGNATURE-----

Merge tag 'fbdev-fixes-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux

Pull fbdev fixes from Tomi Valkeinen:
 "Small fbdev fixes for various fb drivers"

* tag 'fbdev-fixes-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux:
  video: mxsfb: Add missing break
  video: of: display_timing: correct display-timings node finding
  neofb: fix error return code in neofb_probe()
  s3fb: fix error return code in s3_pci_probe()
  video: mmp: drop needless devm cleanup
  OMAPDSS: Add missing dependency on backlight for DSI-CM panel drier
  OMAPDSS: DISPC: set irq_safe for runtime PM
  OMAPDSS: Return right error during connector probe
This commit is contained in:
Linus Torvalds 2013-09-27 09:32:09 -07:00
commit d3aa02695b
10 changed files with 15 additions and 30 deletions

View File

@ -514,7 +514,7 @@ static int mmphw_probe(struct platform_device *pdev)
if (IS_ERR(ctrl->clk)) { if (IS_ERR(ctrl->clk)) {
dev_err(ctrl->dev, "unable to get clk %s\n", mi->clk_name); dev_err(ctrl->dev, "unable to get clk %s\n", mi->clk_name);
ret = -ENOENT; ret = -ENOENT;
goto failed_get_clk; goto failed;
} }
clk_prepare_enable(ctrl->clk); clk_prepare_enable(ctrl->clk);
@ -551,21 +551,8 @@ failed_path_init:
path_deinit(path_plat); path_deinit(path_plat);
} }
if (ctrl->clk) {
devm_clk_put(ctrl->dev, ctrl->clk);
clk_disable_unprepare(ctrl->clk); clk_disable_unprepare(ctrl->clk);
}
failed_get_clk:
devm_free_irq(ctrl->dev, ctrl->irq, ctrl);
failed: failed:
if (ctrl) {
if (ctrl->reg_base)
devm_iounmap(ctrl->dev, ctrl->reg_base);
devm_release_mem_region(ctrl->dev, res->start,
resource_size(res));
devm_kfree(ctrl->dev, ctrl);
}
dev_err(&pdev->dev, "device init failed\n"); dev_err(&pdev->dev, "device init failed\n");
return ret; return ret;

View File

@ -620,6 +620,7 @@ static int mxsfb_restore_mode(struct mxsfb_info *host)
break; break;
case 3: case 3:
bits_per_pixel = 32; bits_per_pixel = 32;
break;
case 1: case 1:
default: default:
return -EINVAL; return -EINVAL;

View File

@ -2075,6 +2075,7 @@ static int neofb_probe(struct pci_dev *dev, const struct pci_device_id *id)
if (!fb_find_mode(&info->var, info, mode_option, NULL, 0, if (!fb_find_mode(&info->var, info, mode_option, NULL, 0,
info->monspecs.modedb, 16)) { info->monspecs.modedb, 16)) {
printk(KERN_ERR "neofb: Unable to find usable video mode.\n"); printk(KERN_ERR "neofb: Unable to find usable video mode.\n");
err = -EINVAL;
goto err_map_video; goto err_map_video;
} }
@ -2097,7 +2098,8 @@ static int neofb_probe(struct pci_dev *dev, const struct pci_device_id *id)
info->fix.smem_len >> 10, info->var.xres, info->fix.smem_len >> 10, info->var.xres,
info->var.yres, h_sync / 1000, h_sync % 1000, v_sync); info->var.yres, h_sync / 1000, h_sync % 1000, v_sync);
if (fb_alloc_cmap(&info->cmap, 256, 0) < 0) err = fb_alloc_cmap(&info->cmap, 256, 0);
if (err < 0)
goto err_map_video; goto err_map_video;
err = register_framebuffer(info); err = register_framebuffer(info);

View File

@ -120,7 +120,7 @@ int of_get_display_timing(struct device_node *np, const char *name,
return -EINVAL; return -EINVAL;
} }
timing_np = of_find_node_by_name(np, name); timing_np = of_get_child_by_name(np, name);
if (!timing_np) { if (!timing_np) {
pr_err("%s: could not find node '%s'\n", pr_err("%s: could not find node '%s'\n",
of_node_full_name(np), name); of_node_full_name(np), name);
@ -143,11 +143,11 @@ struct display_timings *of_get_display_timings(struct device_node *np)
struct display_timings *disp; struct display_timings *disp;
if (!np) { if (!np) {
pr_err("%s: no devicenode given\n", of_node_full_name(np)); pr_err("%s: no device node given\n", of_node_full_name(np));
return NULL; return NULL;
} }
timings_np = of_find_node_by_name(np, "display-timings"); timings_np = of_get_child_by_name(np, "display-timings");
if (!timings_np) { if (!timings_np) {
pr_err("%s: could not find display-timings node\n", pr_err("%s: could not find display-timings node\n",
of_node_full_name(np)); of_node_full_name(np));

View File

@ -35,6 +35,7 @@ config DISPLAY_PANEL_DPI
config DISPLAY_PANEL_DSI_CM config DISPLAY_PANEL_DSI_CM
tristate "Generic DSI Command Mode Panel" tristate "Generic DSI Command Mode Panel"
depends on BACKLIGHT_CLASS_DEVICE
help help
Driver for generic DSI command mode panels. Driver for generic DSI command mode panels.

View File

@ -191,7 +191,7 @@ static int tvc_probe_pdata(struct platform_device *pdev)
in = omap_dss_find_output(pdata->source); in = omap_dss_find_output(pdata->source);
if (in == NULL) { if (in == NULL) {
dev_err(&pdev->dev, "Failed to find video source\n"); dev_err(&pdev->dev, "Failed to find video source\n");
return -ENODEV; return -EPROBE_DEFER;
} }
ddata->in = in; ddata->in = in;

View File

@ -263,7 +263,7 @@ static int dvic_probe_pdata(struct platform_device *pdev)
in = omap_dss_find_output(pdata->source); in = omap_dss_find_output(pdata->source);
if (in == NULL) { if (in == NULL) {
dev_err(&pdev->dev, "Failed to find video source\n"); dev_err(&pdev->dev, "Failed to find video source\n");
return -ENODEV; return -EPROBE_DEFER;
} }
ddata->in = in; ddata->in = in;

View File

@ -290,7 +290,7 @@ static int hdmic_probe_pdata(struct platform_device *pdev)
in = omap_dss_find_output(pdata->source); in = omap_dss_find_output(pdata->source);
if (in == NULL) { if (in == NULL) {
dev_err(&pdev->dev, "Failed to find video source\n"); dev_err(&pdev->dev, "Failed to find video source\n");
return -ENODEV; return -EPROBE_DEFER;
} }
ddata->in = in; ddata->in = in;

View File

@ -3691,6 +3691,7 @@ static int __init omap_dispchw_probe(struct platform_device *pdev)
} }
pm_runtime_enable(&pdev->dev); pm_runtime_enable(&pdev->dev);
pm_runtime_irq_safe(&pdev->dev);
r = dispc_runtime_get(); r = dispc_runtime_get();
if (r) if (r)

View File

@ -1336,14 +1336,7 @@ static int s3_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
(info->var.bits_per_pixel * info->var.xres_virtual); (info->var.bits_per_pixel * info->var.xres_virtual);
if (info->var.yres_virtual < info->var.yres) { if (info->var.yres_virtual < info->var.yres) {
dev_err(info->device, "virtual vertical size smaller than real\n"); dev_err(info->device, "virtual vertical size smaller than real\n");
goto err_find_mode; rc = -EINVAL;
}
/* maximize virtual vertical size for fast scrolling */
info->var.yres_virtual = info->fix.smem_len * 8 /
(info->var.bits_per_pixel * info->var.xres_virtual);
if (info->var.yres_virtual < info->var.yres) {
dev_err(info->device, "virtual vertical size smaller than real\n");
goto err_find_mode; goto err_find_mode;
} }