summaryrefslogtreecommitdiff
path: root/crypto/algapi.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2023-02-14 17:28:28 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2023-03-10 19:10:10 +0800
commit67fb1e2958391ff005a049a147aa82920aef7921 (patch)
tree6cc6a3b6e8dda63a774c079fbcc8ec4823179357 /crypto/algapi.c
parent11f92a1308795294b0ad694f6a260c9b9c62fa51 (diff)
hwrng: xgene - Simplify using devm_clk_get_optional_enabled()
Instead of ignoring errors returned by devm_clk_get() and manually enabling the clk for the whole lifetime of the bound device, use devm_clk_get_optional_enabled(). This is simpler and also more correct as it doesn't ignore errors. This is also more correct because now the call to clk_disable_unprepare() can be dropped from xgene_rng_remove() which happened while the hwrn device was still registered. With the devm callback disabling the clk happens correctly only after devm_hwrng_register() is undone. As a result struct xgene_rng_dev::clk is only used in xgene_rng_probe, and so the struct member can be replaced by a local variable. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/algapi.c')
0 files changed, 0 insertions, 0 deletions