* [PATCH] char: hw_random: ba431-rng: removed unneeded call to platform_set_drvdata()
@ 2023-08-23 11:07 Andrei Coardos
2023-08-23 13:40 ` Martin Kaiser
0 siblings, 1 reply; 2+ messages in thread
From: Andrei Coardos @ 2023-08-23 11:07 UTC (permalink / raw)
To: linux-kernel, linux-crypto; +Cc: alex, herbert, olivia, Andrei Coardos
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>
---
drivers/char/hw_random/ba431-rng.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/char/hw_random/ba431-rng.c b/drivers/char/hw_random/ba431-rng.c
index 5b7ca0416490..b1518dd52a24 100644
--- a/drivers/char/hw_random/ba431-rng.c
+++ b/drivers/char/hw_random/ba431-rng.c
@@ -189,8 +189,6 @@ static int ba431_trng_probe(struct platform_device *pdev)
ba431->rng.cleanup = ba431_trng_cleanup;
ba431->rng.read = ba431_trng_read;
- platform_set_drvdata(pdev, ba431);
-
ret = devm_hwrng_register(&pdev->dev, &ba431->rng);
if (ret) {
dev_err(&pdev->dev, "BA431 registration failed (%d)\n", ret);
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] char: hw_random: ba431-rng: removed unneeded call to platform_set_drvdata()
2023-08-23 11:07 [PATCH] char: hw_random: ba431-rng: removed unneeded call to platform_set_drvdata() Andrei Coardos
@ 2023-08-23 13:40 ` Martin Kaiser
0 siblings, 0 replies; 2+ messages in thread
From: Martin Kaiser @ 2023-08-23 13:40 UTC (permalink / raw)
To: Andrei Coardos; +Cc: linux-kernel, linux-crypto, alex, herbert, olivia
Andrei Coardos (aboutphysycs@gmail.com) wrote:
> 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>
> ---
> drivers/char/hw_random/ba431-rng.c | 2 --
> 1 file changed, 2 deletions(-)
> diff --git a/drivers/char/hw_random/ba431-rng.c b/drivers/char/hw_random/ba431-rng.c
> index 5b7ca0416490..b1518dd52a24 100644
> --- a/drivers/char/hw_random/ba431-rng.c
> +++ b/drivers/char/hw_random/ba431-rng.c
> @@ -189,8 +189,6 @@ static int ba431_trng_probe(struct platform_device *pdev)
> ba431->rng.cleanup = ba431_trng_cleanup;
> ba431->rng.read = ba431_trng_read;
> - platform_set_drvdata(pdev, ba431);
> -
> ret = devm_hwrng_register(&pdev->dev, &ba431->rng);
> if (ret) {
> dev_err(&pdev->dev, "BA431 registration failed (%d)\n", ret);
> --
> 2.34.1
This was already removed in e8c1fdcc62d3 ("hwrng: ba431 - do not set
drvdata").
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-23 13:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-23 11:07 [PATCH] char: hw_random: ba431-rng: removed unneeded call to platform_set_drvdata() Andrei Coardos
2023-08-23 13:40 ` Martin Kaiser
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox