Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 294970
b: refs/heads/master
c: 11a37c7
h: refs/heads/master
v: v3
  • Loading branch information
Kamil Debski authored and Mauro Carvalho Chehab committed Mar 8, 2012
1 parent 39bbbb9 commit 011fa0e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 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: 570d2a48b700948e2ee0cadb184942ce426ae577
refs/heads/master: 11a37c709797cc56f48905e68a3099b79cf08850
22 changes: 20 additions & 2 deletions trunk/drivers/media/video/s5p-g2d/g2d.c
Original file line number Diff line number Diff line change
Expand Up @@ -693,18 +693,30 @@ static int g2d_probe(struct platform_device *pdev)
goto unmap_regs;
}

ret = clk_prepare(dev->clk);
if (ret) {
dev_err(&pdev->dev, "failed to prepare g2d clock\n");
goto put_clk;
}

dev->gate = clk_get(&pdev->dev, "fimg2d");
if (IS_ERR_OR_NULL(dev->gate)) {
dev_err(&pdev->dev, "failed to get g2d clock gate\n");
ret = -ENXIO;
goto put_clk;
goto unprep_clk;
}

ret = clk_prepare(dev->gate);
if (ret) {
dev_err(&pdev->dev, "failed to prepare g2d clock gate\n");
goto put_clk_gate;
}

res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
if (!res) {
dev_err(&pdev->dev, "failed to find IRQ\n");
ret = -ENXIO;
goto put_clk_gate;
goto unprep_clk_gate;
}

dev->irq = res->start;
Expand Down Expand Up @@ -764,8 +776,12 @@ static int g2d_probe(struct platform_device *pdev)
vb2_dma_contig_cleanup_ctx(dev->alloc_ctx);
rel_irq:
free_irq(dev->irq, dev);
unprep_clk_gate:
clk_unprepare(dev->gate);
put_clk_gate:
clk_put(dev->gate);
unprep_clk:
clk_unprepare(dev->clk);
put_clk:
clk_put(dev->clk);
unmap_regs:
Expand All @@ -787,7 +803,9 @@ static int g2d_remove(struct platform_device *pdev)
v4l2_device_unregister(&dev->v4l2_dev);
vb2_dma_contig_cleanup_ctx(dev->alloc_ctx);
free_irq(dev->irq, dev);
clk_unprepare(dev->gate);
clk_put(dev->gate);
clk_unprepare(dev->clk);
clk_put(dev->clk);
iounmap(dev->regs);
release_resource(dev->res_regs);
Expand Down

0 comments on commit 011fa0e

Please sign in to comment.