aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/dispc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/omap2/dss/dispc.c')
-rw-r--r--drivers/video/omap2/dss/dispc.c33
1 files changed, 15 insertions, 18 deletions
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index f235798a7ba1..d8e044df3d40 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -3341,15 +3341,6 @@ static int omap_dispchw_probe(struct platform_device *pdev)
3341 3341
3342 dispc.pdev = pdev; 3342 dispc.pdev = pdev;
3343 3343
3344 clk = clk_get(&pdev->dev, "fck");
3345 if (IS_ERR(clk)) {
3346 DSSERR("can't get fck\n");
3347 r = PTR_ERR(clk);
3348 goto err_get_clk;
3349 }
3350
3351 dispc.dss_clk = clk;
3352
3353 spin_lock_init(&dispc.irq_lock); 3344 spin_lock_init(&dispc.irq_lock);
3354 3345
3355#ifdef CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS 3346#ifdef CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS
@@ -3362,30 +3353,38 @@ static int omap_dispchw_probe(struct platform_device *pdev)
3362 dispc_mem = platform_get_resource(dispc.pdev, IORESOURCE_MEM, 0); 3353 dispc_mem = platform_get_resource(dispc.pdev, IORESOURCE_MEM, 0);
3363 if (!dispc_mem) { 3354 if (!dispc_mem) {
3364 DSSERR("can't get IORESOURCE_MEM DISPC\n"); 3355 DSSERR("can't get IORESOURCE_MEM DISPC\n");
3365 r = -EINVAL; 3356 return -EINVAL;
3366 goto err_ioremap;
3367 } 3357 }
3358
3368 dispc.base = devm_ioremap(&pdev->dev, dispc_mem->start, 3359 dispc.base = devm_ioremap(&pdev->dev, dispc_mem->start,
3369 resource_size(dispc_mem)); 3360 resource_size(dispc_mem));
3370 if (!dispc.base) { 3361 if (!dispc.base) {
3371 DSSERR("can't ioremap DISPC\n"); 3362 DSSERR("can't ioremap DISPC\n");
3372 r = -ENOMEM; 3363 return -ENOMEM;
3373 goto err_ioremap;
3374 } 3364 }
3365
3375 dispc.irq = platform_get_irq(dispc.pdev, 0); 3366 dispc.irq = platform_get_irq(dispc.pdev, 0);
3376 if (dispc.irq < 0) { 3367 if (dispc.irq < 0) {
3377 DSSERR("platform_get_irq failed\n"); 3368 DSSERR("platform_get_irq failed\n");
3378 r = -ENODEV; 3369 return -ENODEV;
3379 goto err_ioremap;
3380 } 3370 }
3381 3371
3382 r = devm_request_irq(&pdev->dev, dispc.irq, omap_dispc_irq_handler, 3372 r = devm_request_irq(&pdev->dev, dispc.irq, omap_dispc_irq_handler,
3383 IRQF_SHARED, "OMAP DISPC", dispc.pdev); 3373 IRQF_SHARED, "OMAP DISPC", dispc.pdev);
3384 if (r < 0) { 3374 if (r < 0) {
3385 DSSERR("request_irq failed\n"); 3375 DSSERR("request_irq failed\n");
3386 goto err_ioremap; 3376 return r;
3377 }
3378
3379 clk = clk_get(&pdev->dev, "fck");
3380 if (IS_ERR(clk)) {
3381 DSSERR("can't get fck\n");
3382 r = PTR_ERR(clk);
3383 return r;
3387 } 3384 }
3388 3385
3386 dispc.dss_clk = clk;
3387
3389 pm_runtime_enable(&pdev->dev); 3388 pm_runtime_enable(&pdev->dev);
3390 3389
3391 r = dispc_runtime_get(); 3390 r = dispc_runtime_get();
@@ -3406,9 +3405,7 @@ static int omap_dispchw_probe(struct platform_device *pdev)
3406 3405
3407err_runtime_get: 3406err_runtime_get:
3408 pm_runtime_disable(&pdev->dev); 3407 pm_runtime_disable(&pdev->dev);
3409err_ioremap:
3410 clk_put(dispc.dss_clk); 3408 clk_put(dispc.dss_clk);
3411err_get_clk:
3412 return r; 3409 return r;
3413} 3410}
3414 3411