Commit 1bd2cd6b authored by Michael van der Westhuizen's avatar Michael van der Westhuizen Committed by Herbert Xu

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: default avatarMichael van der Westhuizen <michael@smart-africa.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 8000112c
...@@ -1755,15 +1755,15 @@ static int spacc_probe(struct platform_device *pdev) ...@@ -1755,15 +1755,15 @@ static int spacc_probe(struct platform_device *pdev)
return PTR_ERR(engine->clk); return PTR_ERR(engine->clk);
} }
if (clk_enable(engine->clk)) { if (clk_prepare_enable(engine->clk)) {
dev_info(&pdev->dev, "unable to enable clk\n"); dev_info(&pdev->dev, "unable to prepare/enable clk\n");
clk_put(engine->clk); clk_put(engine->clk);
return -EIO; return -EIO;
} }
err = device_create_file(&pdev->dev, &dev_attr_stat_irq_thresh); err = device_create_file(&pdev->dev, &dev_attr_stat_irq_thresh);
if (err) { if (err) {
clk_disable(engine->clk); clk_disable_unprepare(engine->clk);
clk_put(engine->clk); clk_put(engine->clk);
return err; return err;
} }
...@@ -1831,7 +1831,7 @@ static int spacc_remove(struct platform_device *pdev) ...@@ -1831,7 +1831,7 @@ static int spacc_remove(struct platform_device *pdev)
crypto_unregister_alg(&alg->alg); crypto_unregister_alg(&alg->alg);
} }
clk_disable(engine->clk); clk_disable_unprepare(engine->clk);
clk_put(engine->clk); clk_put(engine->clk);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment