summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2024-05-31 11:57:34 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2024-06-07 14:46:39 +0300
commit4c6338f8664b5f32d6ef0756a5afef64e50608dc (patch)
tree4f872eb9ad0f4ac0bb4d8838f29cd663ed5ba844
parent771c7faa65fb72c1d8d0ffd2b504058b7d02d51f (diff)
downloadlinux-4c6338f8664b5f32d6ef0756a5afef64e50608dc.tar.xz
hwrng: stm32 - use sizeof(*priv) instead of sizeof(struct stm32_rng_private)
Use sizeof(*priv) instead of sizeof(struct stm32_rng_private), the former makes renaming of struct stm32_rng_private easier if necessary, as it removes one site where such rename has to happen. No functional change. Signed-off-by: Marek Vasut <marex@denx.de> Acked-by: Uwe Kleine-König <ukleinek@kernel.org> Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--drivers/char/hw_random/stm32-rng.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/hw_random/stm32-rng.c b/drivers/char/hw_random/stm32-rng.c
index d08c870eb8d1..9d041a67c295 100644
--- a/drivers/char/hw_random/stm32-rng.c
+++ b/drivers/char/hw_random/stm32-rng.c
@@ -517,7 +517,7 @@ static int stm32_rng_probe(struct platform_device *ofdev)
struct stm32_rng_private *priv;
struct resource *res;
- priv = devm_kzalloc(dev, sizeof(struct stm32_rng_private), GFP_KERNEL);
+ priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;