Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 294309
b: refs/heads/master
c: 5e36097
h: refs/heads/master
i:
  294307: 7f3bf35
v: v3
  • Loading branch information
Tomi Valkeinen committed Jan 25, 2012
1 parent e5af856 commit 7bd7d18
Show file tree
Hide file tree
Showing 10 changed files with 165 additions and 234 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e0e405b9252e5e8926786d796e0d4293bc90cd56
refs/heads/master: 5e36097889725dbe4f098c3f1e93cb2f21cae6ee
16 changes: 6 additions & 10 deletions trunk/drivers/video/omap2/dss/dispc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3365,7 +3365,8 @@ static int omap_dispchw_probe(struct platform_device *pdev)
r = -EINVAL;
goto err_ioremap;
}
dispc.base = ioremap(dispc_mem->start, resource_size(dispc_mem));
dispc.base = devm_ioremap(&pdev->dev, dispc_mem->start,
resource_size(dispc_mem));
if (!dispc.base) {
DSSERR("can't ioremap DISPC\n");
r = -ENOMEM;
Expand All @@ -3375,14 +3376,14 @@ static int omap_dispchw_probe(struct platform_device *pdev)
if (dispc.irq < 0) {
DSSERR("platform_get_irq failed\n");
r = -ENODEV;
goto err_irq;
goto err_ioremap;
}

r = request_irq(dispc.irq, omap_dispc_irq_handler, IRQF_SHARED,
"OMAP DISPC", dispc.pdev);
r = devm_request_irq(&pdev->dev, dispc.irq, omap_dispc_irq_handler,
IRQF_SHARED, "OMAP DISPC", dispc.pdev);
if (r < 0) {
DSSERR("request_irq failed\n");
goto err_irq;
goto err_ioremap;
}

pm_runtime_enable(&pdev->dev);
Expand All @@ -3405,9 +3406,6 @@ static int omap_dispchw_probe(struct platform_device *pdev)

err_runtime_get:
pm_runtime_disable(&pdev->dev);
free_irq(dispc.irq, dispc.pdev);
err_irq:
iounmap(dispc.base);
err_ioremap:
clk_put(dispc.dss_clk);
err_get_clk:
Expand All @@ -3420,8 +3418,6 @@ static int omap_dispchw_remove(struct platform_device *pdev)

clk_put(dispc.dss_clk);

free_irq(dispc.irq, dispc.pdev);
iounmap(dispc.base);
return 0;
}

Expand Down
28 changes: 9 additions & 19 deletions trunk/drivers/video/omap2/dss/dsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -4687,7 +4687,7 @@ static int omap_dsihw_probe(struct platform_device *dsidev)
struct resource *dsi_mem;
struct dsi_data *dsi;

dsi = kzalloc(sizeof(*dsi), GFP_KERNEL);
dsi = devm_kzalloc(&dsidev->dev, sizeof(*dsi), GFP_KERNEL);
if (!dsi) {
r = -ENOMEM;
goto err_alloc;
Expand Down Expand Up @@ -4716,7 +4716,7 @@ static int omap_dsihw_probe(struct platform_device *dsidev)

r = dsi_get_clocks(dsidev);
if (r)
goto err_get_clk;
goto err_alloc;

pm_runtime_enable(&dsidev->dev);

Expand All @@ -4734,7 +4734,8 @@ static int omap_dsihw_probe(struct platform_device *dsidev)
r = -EINVAL;
goto err_ioremap;
}
dsi->base = ioremap(dsi_mem->start, resource_size(dsi_mem));
dsi->base = devm_ioremap(&dsidev->dev, dsi_mem->start,
resource_size(dsi_mem));
if (!dsi->base) {
DSSERR("can't ioremap DSI\n");
r = -ENOMEM;
Expand All @@ -4744,14 +4745,14 @@ static int omap_dsihw_probe(struct platform_device *dsidev)
if (dsi->irq < 0) {
DSSERR("platform_get_irq failed\n");
r = -ENODEV;
goto err_get_irq;
goto err_ioremap;
}

r = request_irq(dsi->irq, omap_dsi_irq_handler, IRQF_SHARED,
dev_name(&dsidev->dev), dsi->pdev);
r = devm_request_irq(&dsidev->dev, dsi->irq, omap_dsi_irq_handler,
IRQF_SHARED, dev_name(&dsidev->dev), dsi->pdev);
if (r < 0) {
DSSERR("request_irq failed\n");
goto err_get_irq;
goto err_ioremap;
}

/* DSI VCs initialization */
Expand All @@ -4765,7 +4766,7 @@ static int omap_dsihw_probe(struct platform_device *dsidev)

r = dsi_runtime_get(dsidev);
if (r)
goto err_get_dsi;
goto err_ioremap;

rev = dsi_read_reg(dsidev, DSI_REVISION);
dev_dbg(&dsidev->dev, "OMAP DSI rev %d.%d\n",
Expand All @@ -4783,14 +4784,8 @@ static int omap_dsihw_probe(struct platform_device *dsidev)

return 0;

err_get_dsi:
free_irq(dsi->irq, dsi->pdev);
err_get_irq:
iounmap(dsi->base);
err_ioremap:
pm_runtime_disable(&dsidev->dev);
err_get_clk:
kfree(dsi);
err_alloc:
return r;
}
Expand All @@ -4815,11 +4810,6 @@ static int omap_dsihw_remove(struct platform_device *dsidev)
dsi->vdds_dsi_reg = NULL;
}

free_irq(dsi->irq, dsi->pdev);
iounmap(dsi->base);

kfree(dsi);

return 0;
}

Expand Down
9 changes: 3 additions & 6 deletions trunk/drivers/video/omap2/dss/dss.c
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,8 @@ static int omap_dsshw_probe(struct platform_device *pdev)
r = -EINVAL;
goto err_ioremap;
}
dss.base = ioremap(dss_mem->start, resource_size(dss_mem));
dss.base = devm_ioremap(&pdev->dev, dss_mem->start,
resource_size(dss_mem));
if (!dss.base) {
DSSERR("can't ioremap DSS\n");
r = -ENOMEM;
Expand All @@ -760,7 +761,7 @@ static int omap_dsshw_probe(struct platform_device *pdev)

r = dss_get_clocks();
if (r)
goto err_clocks;
goto err_ioremap;

pm_runtime_enable(&pdev->dev);

Expand Down Expand Up @@ -808,8 +809,6 @@ static int omap_dsshw_probe(struct platform_device *pdev)
err_runtime_get:
pm_runtime_disable(&pdev->dev);
dss_put_clocks();
err_clocks:
iounmap(dss.base);
err_ioremap:
return r;
}
Expand All @@ -819,8 +818,6 @@ static int omap_dsshw_remove(struct platform_device *pdev)
dpi_exit();
sdi_exit();

iounmap(dss.base);

pm_runtime_disable(&pdev->dev);

dss_put_clocks();
Expand Down
Loading

0 comments on commit 7bd7d18

Please sign in to comment.