Skip to content

Commit

Permalink
hwrng: xgene - 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>
Reviewed-by: Martin Kaiser <martin@kaiser.cx>
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 c7e2c4b commit 4ff6244
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/char/hw_random/xgene-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 4ff6244

Please sign in to comment.