From: Andrei Coardos Date: Mon, 28 Aug 2023 10:23:29 +0000 (+0300) Subject: hwrng: xgene - removed unneeded call to platform_set_drvdata() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=4ff6244696eed0f08398ca500758c85d4b935094;p=linux.git hwrng: xgene - removed unneeded call to platform_set_drvdata() This function call was found to be unnecessary as there is no equivalent platform_get_drvdata() call to access the private data of the driver. Also, the private data is defined in this driver, so there is no risk of it being accessed outside of this driver file. Signed-off-by: Andrei Coardos Reviewed-by: Martin Kaiser Reviewed-by: Alexandru Ardelean Signed-off-by: Herbert Xu --- diff --git a/drivers/char/hw_random/xgene-rng.c b/drivers/char/hw_random/xgene-rng.c index 99f4e86ac3e9a..7382724bf501c 100644 --- a/drivers/char/hw_random/xgene-rng.c +++ b/drivers/char/hw_random/xgene-rng.c @@ -321,7 +321,6 @@ static int xgene_rng_probe(struct platform_device *pdev) return -ENOMEM; ctx->dev = &pdev->dev; - platform_set_drvdata(pdev, ctx); ctx->csr_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(ctx->csr_base))