Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 294884
b: refs/heads/master
c: 3e9caa5
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Jan 23, 2012
1 parent aac5487 commit f45c0fb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 59b30294e14fa6a370fdd2bc2921cca1f977ef16
refs/heads/master: 3e9caa525147e28d032a8e413d9797c21cbaf88c
14 changes: 14 additions & 0 deletions trunk/drivers/media/video/atmel-isi.c
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,9 @@ static int __devexit atmel_isi_remove(struct platform_device *pdev)
isi->fb_descriptors_phys);

iounmap(isi->regs);
clk_unprepare(isi->mck);
clk_put(isi->mck);
clk_unprepare(isi->pclk);
clk_put(isi->pclk);
kfree(isi);

Expand Down Expand Up @@ -955,6 +957,10 @@ static int __devinit atmel_isi_probe(struct platform_device *pdev)
if (IS_ERR(pclk))
return PTR_ERR(pclk);

ret = clk_prepare(pclk);
if (ret)
goto err_clk_prepare_pclk;

isi = kzalloc(sizeof(struct atmel_isi), GFP_KERNEL);
if (!isi) {
ret = -ENOMEM;
Expand All @@ -978,6 +984,10 @@ static int __devinit atmel_isi_probe(struct platform_device *pdev)
goto err_clk_get;
}

ret = clk_prepare(isi->mck);
if (ret)
goto err_clk_prepare_mck;

/* Set ISI_MCK's frequency, it should be faster than pixel clock */
ret = clk_set_rate(isi->mck, pdata->mck_hz);
if (ret < 0)
Expand Down Expand Up @@ -1059,10 +1069,14 @@ static int __devinit atmel_isi_probe(struct platform_device *pdev)
isi->fb_descriptors_phys);
err_alloc_descriptors:
err_set_mck_rate:
clk_unprepare(isi->mck);
err_clk_prepare_mck:
clk_put(isi->mck);
err_clk_get:
kfree(isi);
err_alloc_isi:
clk_unprepare(pclk);
err_clk_prepare_pclk:
clk_put(pclk);

return ret;
Expand Down

0 comments on commit f45c0fb

Please sign in to comment.