Skip to contentSkip to conversation

crypto: s5p-sss - Use devm_clk_get()

PATCH In review Jingoo Han 2 participants 2 messages Jan 10, 2013 – Jan 20, 2013

Subsystems (2)
lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH v2 1/1 crypto: s5p-sss - Use devm_clk_get()

Use devm_clk_get() rather than clk_get() to make cleanup paths more simple.

---
Changes since v1:
- modified the commit message

 drivers/crypto/s5p-sss.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
drivers/crypto/s5p-sss.c +1 -3
index 49ad8cb..4b31432 100644
@@ -580,7 +580,7 @@ static int s5p_aes_probe(struct platform_device *pdev)
 				     resource_size(res), pdev->name))
 		return -EBUSY;
 
-	pdata->clk = clk_get(dev, "secss");
+	pdata->clk = devm_clk_get(dev, "secss");
 	if (IS_ERR(pdata->clk)) {
 		dev_err(dev, "failed to find secss clock source\n");
 		return -ENOENT;
@@ -645,7 +645,6 @@ static int s5p_aes_probe(struct platform_device *pdev)
 
  err_irq:
 	clk_disable(pdata->clk);
-	clk_put(pdata->clk);
 
 	s5p_dev = NULL;
 	platform_set_drvdata(pdev, NULL);
@@ -667,7 +666,6 @@ static int s5p_aes_remove(struct platform_device *pdev)
 	tasklet_kill(&pdata->tasklet);
 
 	clk_disable(pdata->clk);
-	clk_put(pdata->clk);
 
 	s5p_dev = NULL;
 	platform_set_drvdata(pdev, NULL);
Signature · 1 line
1.7.2.5
maintainer
#1 lore raw
Quoted 4 lines · Jingoo Han

Use devm_clk_get() rather than clk_get() to make cleanup paths more simple.

Patch applied.

Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt