diff options
Diffstat (limited to 'drivers/crypto/caam/caamalg.c')
-rw-r--r-- | drivers/crypto/caam/caamalg.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c index 86a0d415b9a7..ad9781e646c0 100644 --- a/drivers/crypto/caam/caamalg.c +++ b/drivers/crypto/caam/caamalg.c | |||
@@ -2071,13 +2071,15 @@ static int caam_cra_init(struct crypto_tfm *tfm) | |||
2071 | container_of(alg, struct caam_crypto_alg, crypto_alg); | 2071 | container_of(alg, struct caam_crypto_alg, crypto_alg); |
2072 | struct caam_ctx *ctx = crypto_tfm_ctx(tfm); | 2072 | struct caam_ctx *ctx = crypto_tfm_ctx(tfm); |
2073 | struct caam_drv_private *priv = dev_get_drvdata(caam_alg->ctrldev); | 2073 | struct caam_drv_private *priv = dev_get_drvdata(caam_alg->ctrldev); |
2074 | struct platform_device *pdev; | ||
2074 | int tgt_jr = atomic_inc_return(&priv->tfm_count); | 2075 | int tgt_jr = atomic_inc_return(&priv->tfm_count); |
2075 | 2076 | ||
2076 | /* | 2077 | /* |
2077 | * distribute tfms across job rings to ensure in-order | 2078 | * distribute tfms across job rings to ensure in-order |
2078 | * crypto request processing per tfm | 2079 | * crypto request processing per tfm |
2079 | */ | 2080 | */ |
2080 | ctx->jrdev = priv->jrdev[(tgt_jr / 2) % priv->total_jobrs]; | 2081 | pdev = priv->jrpdev[(tgt_jr / 2) % priv->total_jobrs]; |
2082 | ctx->jrdev = &pdev->dev; | ||
2081 | 2083 | ||
2082 | /* copy descriptor header template value */ | 2084 | /* copy descriptor header template value */ |
2083 | ctx->class1_alg_type = OP_TYPE_CLASS1_ALG | caam_alg->class1_alg_type; | 2085 | ctx->class1_alg_type = OP_TYPE_CLASS1_ALG | caam_alg->class1_alg_type; |