From: Naveen Krishna Chatradhi Subject: [PATCH 8/9 v7] crypto:s5p-sss: Use clk_prepare/clk_unprepare Date: Mon, 17 Feb 2014 15:14:34 +0530 Message-ID: <1392630275-8667-9-git-send-email-ch.naveen@samsung.com> References: <1392630275-8667-1-git-send-email-ch.naveen@samsung.com> Cc: linux-kernel@vger.kernel.org, vzapolskiy@gmail.com, herbert@gondor.apana.org.au, naveenkrishna.ch@gmail.com, cpgs@samsung.com, davem@davemloft.net To: linux-crypto@vger.kernel.org, linux-samsung-soc@vger.kernel.org Return-path: Received: from mailout4.samsung.com ([203.254.224.34]:29241 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752910AbaBQJp0 (ORCPT ); Mon, 17 Feb 2014 04:45:26 -0500 In-reply-to: <1392630275-8667-1-git-send-email-ch.naveen@samsung.com> Sender: linux-crypto-owner@vger.kernel.org List-ID: This patch set adds use of clk_prepare/clk_unprepare as required by generic clock framework. Signed-off-by: Naveen Krishna Chatradhi Reviewed-by: Tomasz Figa CC: David S. Miller CC: Herbert Xu CC: Vladimir Zapolskiy TO: CC: --- Changes since v6: None drivers/crypto/s5p-sss.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c index 7da1da4..429b4c1 100644 --- a/drivers/crypto/s5p-sss.c +++ b/drivers/crypto/s5p-sss.c @@ -648,7 +648,11 @@ static int s5p_aes_probe(struct platform_device *pdev) return -ENOENT; } - clk_enable(pdata->clk); + err = clk_prepare_enable(pdata->clk); + if (err < 0) { + dev_err(dev, "Enabling SSS clk failed, err %d\n", err); + return err; + } spin_lock_init(&pdata->lock); pdata->ioaddr = devm_ioremap(dev, res->start, @@ -711,7 +715,7 @@ static int s5p_aes_probe(struct platform_device *pdev) tasklet_kill(&pdata->tasklet); err_irq: - clk_disable(pdata->clk); + clk_disable_unprepare(pdata->clk); s5p_dev = NULL; @@ -731,7 +735,7 @@ static int s5p_aes_remove(struct platform_device *pdev) tasklet_kill(&pdata->tasklet); - clk_disable(pdata->clk); + clk_disable_unprepare(pdata->clk); s5p_dev = NULL; -- 1.7.9.5