aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/ep93xx-fb.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-11 21:21:02 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-11 21:21:02 -0400
commit5f76945a9c978b8b8bf8eb7fe3b17b9981240a97 (patch)
treedf61aca168df657bc71ce8b578bcb0c81b0622ee /drivers/video/ep93xx-fb.c
parent940e3a8dd6683a3787faf769b3df7a06f1c2fa31 (diff)
parentcd9d6f10d07f26dd8a70e519c22b6b4f8a9e3e7a (diff)
Merge tag 'fbdev-updates-for-3.7' of git://github.com/schandinat/linux-2.6
Pull fbdev updates from Florian Tobias Schandinat: "This includes: - large updates for OMAP - basic OMAP5 DSS support for DPI and DSI outputs - large cleanups and restructuring - some update to Exynos and da8xx-fb - removal of the pnx4008 driver (arch removed) - various other small patches" Fix up some trivial conflicts (mostly just include line changes, but also some due to the renaming of the deferred work functions by Tejun). * tag 'fbdev-updates-for-3.7' of git://github.com/schandinat/linux-2.6: (193 commits) gbefb: fix compile error video: mark nuc900fb_map_video_memory as __devinit video/mx3fb: set .owner to prevent module unloading while being used video: exynos_dp: use clk_prepare_enable and clk_disable_unprepare drivers/video/exynos/exynos_mipi_dsi.c: fix error return code drivers/video/savage/savagefb_driver.c: fix error return code video: s3c-fb: use clk_prepare_enable and clk_disable_unprepare da8xx-fb: save and restore LCDC context across suspend/resume cycle da8xx-fb: add pm_runtime support video/udlfb: fix line counting in fb_write OMAPDSS: add missing include for string.h OMAPDSS: DISPC: Configure color conversion coefficients for writeback OMAPDSS: DISPC: Add manager like functions for writeback OMAPDSS: DISPC: Configure writeback FIFOs OMAPDSS: DISPC: Configure writeback specific parameters in dispc_wb_setup() OMAPDSS: DISPC: Configure overlay-like parameters in dispc_wb_setup OMAPDSS: DISPC: Add function to set channel in for writeback OMAPDSS: DISPC: Don't set chroma resampling bit for writeback OMAPDSS: DISPC: Downscale chroma if plane is writeback OMAPDSS: DISPC: Configure input and output sizes for writeback ...
Diffstat (limited to 'drivers/video/ep93xx-fb.c')
-rw-r--r--drivers/video/ep93xx-fb.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/video/ep93xx-fb.c b/drivers/video/ep93xx-fb.c
index f2c092da84b0..755ef3e65caf 100644
--- a/drivers/video/ep93xx-fb.c
+++ b/drivers/video/ep93xx-fb.c
@@ -529,7 +529,8 @@ static int __devinit ep93xxfb_probe(struct platform_device *pdev)
529 * any of the framebuffer registers. 529 * any of the framebuffer registers.
530 */ 530 */
531 fbi->res = res; 531 fbi->res = res;
532 fbi->mmio_base = ioremap(res->start, resource_size(res)); 532 fbi->mmio_base = devm_ioremap(&pdev->dev, res->start,
533 resource_size(res));
533 if (!fbi->mmio_base) { 534 if (!fbi->mmio_base) {
534 err = -ENXIO; 535 err = -ENXIO;
535 goto failed_resource; 536 goto failed_resource;
@@ -553,20 +554,20 @@ static int __devinit ep93xxfb_probe(struct platform_device *pdev)
553 if (err == 0) { 554 if (err == 0) {
554 dev_err(info->dev, "No suitable video mode found\n"); 555 dev_err(info->dev, "No suitable video mode found\n");
555 err = -EINVAL; 556 err = -EINVAL;
556 goto failed_mode; 557 goto failed_resource;
557 } 558 }
558 559
559 if (mach_info->setup) { 560 if (mach_info->setup) {
560 err = mach_info->setup(pdev); 561 err = mach_info->setup(pdev);
561 if (err) 562 if (err)
562 goto failed_mode; 563 goto failed_resource;
563 } 564 }
564 565
565 err = ep93xxfb_check_var(&info->var, info); 566 err = ep93xxfb_check_var(&info->var, info);
566 if (err) 567 if (err)
567 goto failed_check; 568 goto failed_check;
568 569
569 fbi->clk = clk_get(info->dev, NULL); 570 fbi->clk = devm_clk_get(&pdev->dev, NULL);
570 if (IS_ERR(fbi->clk)) { 571 if (IS_ERR(fbi->clk)) {
571 err = PTR_ERR(fbi->clk); 572 err = PTR_ERR(fbi->clk);
572 fbi->clk = NULL; 573 fbi->clk = NULL;
@@ -578,19 +579,15 @@ static int __devinit ep93xxfb_probe(struct platform_device *pdev)
578 579
579 err = register_framebuffer(info); 580 err = register_framebuffer(info);
580 if (err) 581 if (err)
581 goto failed; 582 goto failed_check;
582 583
583 dev_info(info->dev, "registered. Mode = %dx%d-%d\n", 584 dev_info(info->dev, "registered. Mode = %dx%d-%d\n",
584 info->var.xres, info->var.yres, info->var.bits_per_pixel); 585 info->var.xres, info->var.yres, info->var.bits_per_pixel);
585 return 0; 586 return 0;
586 587
587failed:
588 clk_put(fbi->clk);
589failed_check: 588failed_check:
590 if (fbi->mach_info->teardown) 589 if (fbi->mach_info->teardown)
591 fbi->mach_info->teardown(pdev); 590 fbi->mach_info->teardown(pdev);
592failed_mode:
593 iounmap(fbi->mmio_base);
594failed_resource: 591failed_resource:
595 ep93xxfb_dealloc_videomem(info); 592 ep93xxfb_dealloc_videomem(info);
596failed_videomem: 593failed_videomem:
@@ -609,8 +606,6 @@ static int __devexit ep93xxfb_remove(struct platform_device *pdev)
609 606
610 unregister_framebuffer(info); 607 unregister_framebuffer(info);
611 clk_disable(fbi->clk); 608 clk_disable(fbi->clk);
612 clk_put(fbi->clk);
613 iounmap(fbi->mmio_base);
614 ep93xxfb_dealloc_videomem(info); 609 ep93xxfb_dealloc_videomem(info);
615 fb_dealloc_cmap(&info->cmap); 610 fb_dealloc_cmap(&info->cmap);
616 611