summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorAndrei Coardos <aboutphysycs@gmail.com>2023-08-28 13:17:57 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2023-09-15 13:29:45 +0300
commitc7e2c4b37e6d54db92a7e74f7e4c015be33601a3 (patch)
tree378816a930dc1c0183ea18d40448afd1c4c84739 /drivers/char
parent0a596b0682a7ce37e26c36629816f105c6459d06 (diff)
downloadlinux-c7e2c4b37e6d54db92a7e74f7e4c015be33601a3.tar.xz
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>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/hw_random/mpfs-rng.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/char/hw_random/mpfs-rng.c b/drivers/char/hw_random/mpfs-rng.c
index c6972734ae62..0994024daa70 100644
--- a/drivers/char/hw_random/mpfs-rng.c
+++ b/drivers/char/hw_random/mpfs-rng.c
@@ -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");