Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

hwrng: mpfs - 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 <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>

authored by

Andrei Coardos and committed by
Herbert Xu
c7e2c4b3 0a596b06

-2
-2
drivers/char/hw_random/mpfs-rng.c
··· 79 79 rng_priv->rng.read = mpfs_rng_read; 80 80 rng_priv->rng.name = pdev->name; 81 81 82 - platform_set_drvdata(pdev, rng_priv); 83 - 84 82 ret = devm_hwrng_register(&pdev->dev, &rng_priv->rng); 85 83 if (ret) 86 84 return dev_err_probe(&pdev->dev, ret, "Failed to register MPFS hwrng\n");