Commit d3aa02695bec49cc4d2cc36df67c22a162e0f1a4

Authored by Linus Torvalds

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

Showing 10 changed files Side-by-side Diff

drivers/video/mmp/hw/mmp_ctrl.c
... ... @@ -514,7 +514,7 @@
514 514 if (IS_ERR(ctrl->clk)) {
515 515 dev_err(ctrl->dev, "unable to get clk %s\n", mi->clk_name);
516 516 ret = -ENOENT;
517   - goto failed_get_clk;
  517 + goto failed;
518 518 }
519 519 clk_prepare_enable(ctrl->clk);
520 520  
521 521  
... ... @@ -551,21 +551,8 @@
551 551 path_deinit(path_plat);
552 552 }
553 553  
554   - if (ctrl->clk) {
555   - devm_clk_put(ctrl->dev, ctrl->clk);
556   - clk_disable_unprepare(ctrl->clk);
557   - }
558   -failed_get_clk:
559   - devm_free_irq(ctrl->dev, ctrl->irq, ctrl);
  554 + clk_disable_unprepare(ctrl->clk);
560 555 failed:
561   - if (ctrl) {
562   - if (ctrl->reg_base)
563   - devm_iounmap(ctrl->dev, ctrl->reg_base);
564   - devm_release_mem_region(ctrl->dev, res->start,
565   - resource_size(res));
566   - devm_kfree(ctrl->dev, ctrl);
567   - }
568   -
569 556 dev_err(&pdev->dev, "device init failed\n");
570 557  
571 558 return ret;
drivers/video/mxsfb.c
... ... @@ -620,6 +620,7 @@
620 620 break;
621 621 case 3:
622 622 bits_per_pixel = 32;
  623 + break;
623 624 case 1:
624 625 default:
625 626 return -EINVAL;
drivers/video/neofb.c
... ... @@ -2075,6 +2075,7 @@
2075 2075 if (!fb_find_mode(&info->var, info, mode_option, NULL, 0,
2076 2076 info->monspecs.modedb, 16)) {
2077 2077 printk(KERN_ERR "neofb: Unable to find usable video mode.\n");
  2078 + err = -EINVAL;
2078 2079 goto err_map_video;
2079 2080 }
2080 2081  
... ... @@ -2097,7 +2098,8 @@
2097 2098 info->fix.smem_len >> 10, info->var.xres,
2098 2099 info->var.yres, h_sync / 1000, h_sync % 1000, v_sync);
2099 2100  
2100   - if (fb_alloc_cmap(&info->cmap, 256, 0) < 0)
  2101 + err = fb_alloc_cmap(&info->cmap, 256, 0);
  2102 + if (err < 0)
2101 2103 goto err_map_video;
2102 2104  
2103 2105 err = register_framebuffer(info);
drivers/video/of_display_timing.c
... ... @@ -120,7 +120,7 @@
120 120 return -EINVAL;
121 121 }
122 122  
123   - timing_np = of_find_node_by_name(np, name);
  123 + timing_np = of_get_child_by_name(np, name);
124 124 if (!timing_np) {
125 125 pr_err("%s: could not find node '%s'\n",
126 126 of_node_full_name(np), name);
127 127  
... ... @@ -143,11 +143,11 @@
143 143 struct display_timings *disp;
144 144  
145 145 if (!np) {
146   - pr_err("%s: no devicenode given\n", of_node_full_name(np));
  146 + pr_err("%s: no device node given\n", of_node_full_name(np));
147 147 return NULL;
148 148 }
149 149  
150   - timings_np = of_find_node_by_name(np, "display-timings");
  150 + timings_np = of_get_child_by_name(np, "display-timings");
151 151 if (!timings_np) {
152 152 pr_err("%s: could not find display-timings node\n",
153 153 of_node_full_name(np));
drivers/video/omap2/displays-new/Kconfig
... ... @@ -35,6 +35,7 @@
35 35  
36 36 config DISPLAY_PANEL_DSI_CM
37 37 tristate "Generic DSI Command Mode Panel"
  38 + depends on BACKLIGHT_CLASS_DEVICE
38 39 help
39 40 Driver for generic DSI command mode panels.
40 41  
drivers/video/omap2/displays-new/connector-analog-tv.c
... ... @@ -191,7 +191,7 @@
191 191 in = omap_dss_find_output(pdata->source);
192 192 if (in == NULL) {
193 193 dev_err(&pdev->dev, "Failed to find video source\n");
194   - return -ENODEV;
  194 + return -EPROBE_DEFER;
195 195 }
196 196  
197 197 ddata->in = in;
drivers/video/omap2/displays-new/connector-dvi.c
... ... @@ -263,7 +263,7 @@
263 263 in = omap_dss_find_output(pdata->source);
264 264 if (in == NULL) {
265 265 dev_err(&pdev->dev, "Failed to find video source\n");
266   - return -ENODEV;
  266 + return -EPROBE_DEFER;
267 267 }
268 268  
269 269 ddata->in = in;
drivers/video/omap2/displays-new/connector-hdmi.c
... ... @@ -290,7 +290,7 @@
290 290 in = omap_dss_find_output(pdata->source);
291 291 if (in == NULL) {
292 292 dev_err(&pdev->dev, "Failed to find video source\n");
293   - return -ENODEV;
  293 + return -EPROBE_DEFER;
294 294 }
295 295  
296 296 ddata->in = in;
drivers/video/omap2/dss/dispc.c
... ... @@ -3691,6 +3691,7 @@
3691 3691 }
3692 3692  
3693 3693 pm_runtime_enable(&pdev->dev);
  3694 + pm_runtime_irq_safe(&pdev->dev);
3694 3695  
3695 3696 r = dispc_runtime_get();
3696 3697 if (r)
drivers/video/s3fb.c
... ... @@ -1336,14 +1336,7 @@
1336 1336 (info->var.bits_per_pixel * info->var.xres_virtual);
1337 1337 if (info->var.yres_virtual < info->var.yres) {
1338 1338 dev_err(info->device, "virtual vertical size smaller than real\n");
1339   - goto err_find_mode;
1340   - }
1341   -
1342   - /* maximize virtual vertical size for fast scrolling */
1343   - info->var.yres_virtual = info->fix.smem_len * 8 /
1344   - (info->var.bits_per_pixel * info->var.xres_virtual);
1345   - if (info->var.yres_virtual < info->var.yres) {
1346   - dev_err(info->device, "virtual vertical size smaller than real\n");
  1339 + rc = -EINVAL;
1347 1340 goto err_find_mode;
1348 1341 }
1349 1342