From: Marcus Folkesson <marcus.folkesson@gmail.com>
To: Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Horia Geanta <horia.geanta@nxp.com>,
Arnd Bergmann <arnd@arndb.de>,
Alex Porosanu <alexandru.porosanu@nxp.com>,
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
Baoyou Xie <baoyou.xie@linaro.org>,
Russell King <rmk+kernel@armlinux.org.uk>
Cc: linux-crypto@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] crypto: caam: check caam_emi_slow instead of re-lookup platform
Date: Mon, 28 Nov 2016 12:53:28 -0500 [thread overview]
Message-ID: <20161128175328.GA29713@gmail.com> (raw)
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
Russel King, sorry, I did not see your comment until now.
drivers/crypto/caam/ctrl.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c
index 5abaf3743b86..4993c90ceb3f 100644
--- a/drivers/crypto/caam/ctrl.c
+++ b/drivers/crypto/caam/ctrl.c
@@ -329,7 +329,7 @@ static int caam_remove(struct platform_device *pdev)
clk_disable_unprepare(ctrlpriv->caam_ipg);
clk_disable_unprepare(ctrlpriv->caam_mem);
clk_disable_unprepare(ctrlpriv->caam_aclk);
- if (!of_machine_is_compatible("fsl,imx6ul"))
+ if (ctrlpriv->caam_emi_slow)
clk_disable_unprepare(ctrlpriv->caam_emi_slow);
return 0;
}
@@ -511,7 +511,7 @@ static int caam_probe(struct platform_device *pdev)
goto disable_caam_mem;
}
- if (!of_machine_is_compatible("fsl,imx6ul")) {
+ if (ctrlpriv->caam_emi_slow) {
ret = clk_prepare_enable(ctrlpriv->caam_emi_slow);
if (ret < 0) {
dev_err(&pdev->dev, "can't enable CAAM emi slow clock: %d\n",
@@ -833,7 +833,7 @@ caam_remove:
iounmap_ctrl:
iounmap(ctrl);
disable_caam_emi_slow:
- if (!of_machine_is_compatible("fsl,imx6ul"))
+ if (ctrlpriv->caam_emi_slow)
clk_disable_unprepare(ctrlpriv->caam_emi_slow);
disable_caam_aclk:
clk_disable_unprepare(ctrlpriv->caam_aclk);
--
2.11.0.rc2
reply other threads:[~2016-11-28 17:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161128175328.GA29713@gmail.com \
--to=marcus.folkesson@gmail.com \
--cc=alexandru.porosanu@nxp.com \
--cc=arnd@arndb.de \
--cc=baoyou.xie@linaro.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=horia.geanta@nxp.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=robh+dt@kernel.org \
--cc=srinivas.kandagatla@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).