mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
crypto: caam - use devres to de-initialize QI
Use devres to de-initialize the QI and drop explicit de-initialization code in caam_remove(). Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Reviewed-by: Horia Geantă <horia.geanta@nxp.com> Cc: Chris Healy <cphealy@gmail.com> Cc: Lucas Stach <l.stach@pengutronix.de> Cc: Horia Geantă <horia.geanta@nxp.com> Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: Iuliana Prodan <iuliana.prodan@nxp.com> Cc: linux-crypto@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
committed by
Herbert Xu
parent
e57acaf0df
commit
f414de2e2f
@@ -500,9 +500,10 @@ void caam_drv_ctx_rel(struct caam_drv_ctx *drv_ctx)
|
||||
}
|
||||
EXPORT_SYMBOL(caam_drv_ctx_rel);
|
||||
|
||||
void caam_qi_shutdown(struct device *qidev)
|
||||
static void caam_qi_shutdown(void *data)
|
||||
{
|
||||
int i;
|
||||
struct device *qidev = data;
|
||||
struct caam_qi_priv *priv = &qipriv;
|
||||
const cpumask_t *cpus = qman_affine_cpus();
|
||||
|
||||
@@ -761,7 +762,10 @@ int caam_qi_init(struct platform_device *caam_pdev)
|
||||
×_congested, &caam_fops_u64_ro);
|
||||
#endif
|
||||
|
||||
ctrlpriv->qi_init = 1;
|
||||
err = devm_add_action_or_reset(qidev, caam_qi_shutdown, ctrlpriv);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
dev_info(qidev, "Linux CAAM Queue I/F driver initialised\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user