Skip to content

Commit

Permalink
hwrng: mpfs - removed unneeded call to platform_set_drvdata()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrei Coardos authored and Herbert Xu committed Sep 15, 2023
1 parent 0a596b0 commit c7e2c4b
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/char/hw_random/mpfs-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit c7e2c4b

Please sign in to comment.