]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
hwrng: mpfs - removed unneeded call to platform_set_drvdata()
authorAndrei Coardos <aboutphysycs@gmail.com>
Mon, 28 Aug 2023 10:17:57 +0000 (13:17 +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>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Alexandru Ardelean <alex@shruggie.ro>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/char/hw_random/mpfs-rng.c

index c6972734ae62e8e31b734b10beaa6ceed13af326..0994024daa703248ba01a7b05c06ad88853db382 100644 (file)
@@ -79,8 +79,6 @@ static int mpfs_rng_probe(struct platform_device *pdev)
        rng_priv->rng.read = mpfs_rng_read;
        rng_priv->rng.name = pdev->name;
 
-       platform_set_drvdata(pdev, rng_priv);
-
        ret = devm_hwrng_register(&pdev->dev, &rng_priv->rng);
        if (ret)
                return dev_err_probe(&pdev->dev, ret, "Failed to register MPFS hwrng\n");