diff options
author | Michael van der Westhuizen <michael@smart-africa.com> | 2015-06-19 15:55:51 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-06-21 19:59:22 +0800 |
commit | 1bd2cd6bc6ad8b582046818189766f109687b3fe (patch) | |
tree | f05d61943c9772419972327287b620873024b885 /drivers/crypto | |
parent | 8000112cedb8743bad67997a96dc94877a36ce0f (diff) | |
download | op-kernel-dev-1bd2cd6bc6ad8b582046818189766f109687b3fe.zip op-kernel-dev-1bd2cd6bc6ad8b582046818189766f109687b3fe.tar.gz |
crypto: picoxcell - Update to the current clk API
The picoXcell hardware crypto accelerator driver was using an
older version of the clk framework, and not (un)preparing the
clock before enabling/disabling it. This change uses the handy
clk_prepare_enable function to interact with the current clk
framework correctly.
Signed-off-by: Michael van der Westhuizen <michael@smart-africa.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r-- | drivers/crypto/picoxcell_crypto.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/crypto/picoxcell_crypto.c b/drivers/crypto/picoxcell_crypto.c index c2fd860..4f56f36 100644 --- a/drivers/crypto/picoxcell_crypto.c +++ b/drivers/crypto/picoxcell_crypto.c @@ -1755,15 +1755,15 @@ static int spacc_probe(struct platform_device *pdev) return PTR_ERR(engine->clk); } - if (clk_enable(engine->clk)) { - dev_info(&pdev->dev, "unable to enable clk\n"); + if (clk_prepare_enable(engine->clk)) { + dev_info(&pdev->dev, "unable to prepare/enable clk\n"); clk_put(engine->clk); return -EIO; } err = device_create_file(&pdev->dev, &dev_attr_stat_irq_thresh); if (err) { - clk_disable(engine->clk); + clk_disable_unprepare(engine->clk); clk_put(engine->clk); return err; } @@ -1831,7 +1831,7 @@ static int spacc_remove(struct platform_device *pdev) crypto_unregister_alg(&alg->alg); } - clk_disable(engine->clk); + clk_disable_unprepare(engine->clk); clk_put(engine->clk); return 0; |