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
Unified · Split
| @@ -514,7 +514,7 @@ static int mmphw_probe(struct platform_device *pdev) · 513 unmodified lines | ||
| 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 | |
| @@ -551,21 +551,8 @@ failed_path_init: · 30 unmodified lines | ||
| 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; |
| @@ -620,6 +620,7 @@ static int mxsfb_restore_mode(struct mxsfb_info *host) · 619 unmodified lines | ||
| 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; |
| @@ -2075,6 +2075,7 @@ static int neofb_probe(struct pci_dev *dev, const struct pci_device_id *id) · 2074 unmodified lines | ||
| 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 @@ static int neofb_probe(struct pci_dev *dev, const struct pci_device_id *id) · 16 unmodified lines | ||
| 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); |
| @@ -120,7 +120,7 @@ int of_get_display_timing(struct device_node *np, const char *name, · 119 unmodified lines | ||
| 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); |
| @@ -143,11 +143,11 @@ struct display_timings *of_get_display_timings(struct device_node *np) · 16 unmodified lines | ||
| 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)); |
| @@ -35,6 +35,7 @@ config DISPLAY_PANEL_DPI · 34 unmodified lines | ||
| 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 | |
| @@ -191,7 +191,7 @@ static int tvc_probe_pdata(struct platform_device *pdev) · 190 unmodified lines | ||
| 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; |
| @@ -263,7 +263,7 @@ static int dvic_probe_pdata(struct platform_device *pdev) · 262 unmodified lines | ||
| 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; |
| @@ -290,7 +290,7 @@ static int hdmic_probe_pdata(struct platform_device *pdev) · 289 unmodified lines | ||
| 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; |
| @@ -3691,6 +3691,7 @@ static int __init omap_dispchw_probe(struct platform_device *pdev) · 3690 unmodified lines | ||
| 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) |
| @@ -1336,14 +1336,7 @@ static int s3_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) · 1335 unmodified lines | ||
| 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 | |