hwrng: xgene - removed unneeded call to platform_set_drvdata()
authorAndrei Coardos <aboutphysycs@gmail.com>
Mon, 28 Aug 2023 10:23:29 +0000 (13:23 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 15 Sep 2023 10:29:45 +0000 (18:29 +0800)
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 <aboutphysycs@gmail.com>
Reviewed-by: Martin Kaiser <martin@kaiser.cx>
Reviewed-by: Alexandru Ardelean <alex@shruggie.ro>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/char/hw_random/xgene-rng.c

index 99f4e86ac3e9ad67fab5b42b46a30beef6ae1990..7382724bf501c231029d837cf568f73f818922b9 100644 (file)
@@ -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))