2023-07-16 14:22:44

by Martin Kaiser

[permalink] [raw]
Subject: [PATCH] hwrng: arm-smccc-trng - don't set drvdata

Don't set drvdata, there's nobody who reads it.

Signed-off-by: Martin Kaiser <[email protected]>
---
drivers/char/hw_random/arm_smccc_trng.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/char/hw_random/arm_smccc_trng.c b/drivers/char/hw_random/arm_smccc_trng.c
index e34c3ea692b6..7e954341b09f 100644
--- a/drivers/char/hw_random/arm_smccc_trng.c
+++ b/drivers/char/hw_random/arm_smccc_trng.c
@@ -105,8 +105,6 @@ static int smccc_trng_probe(struct platform_device *pdev)
trng->name = "smccc_trng";
trng->read = smccc_trng_read;

- platform_set_drvdata(pdev, trng);
-
return devm_hwrng_register(&pdev->dev, trng);
}

--
2.30.2



2023-07-22 02:24:00

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH] hwrng: arm-smccc-trng - don't set drvdata

On Sun, Jul 16, 2023 at 04:11:12PM +0200, Martin Kaiser wrote:
> Don't set drvdata, there's nobody who reads it.
>
> Signed-off-by: Martin Kaiser <[email protected]>
> ---
> drivers/char/hw_random/arm_smccc_trng.c | 2 --
> 1 file changed, 2 deletions(-)

Patch applied. Thanks.
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt