diff options
author | Marek Vasut <marex@denx.de> | 2024-05-31 10:57:34 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2024-06-07 13:46:39 +0200 |
commit | 4c6338f8664b5f32d6ef0756a5afef64e50608dc (patch) | |
tree | 4f872eb9ad0f4ac0bb4d8838f29cd663ed5ba844 /drivers/char/hw_random | |
parent | hwrng: stm32 - cache device pointer in struct stm32_rng_private (diff) | |
download | linux-4c6338f8664b5f32d6ef0756a5afef64e50608dc.tar.xz linux-4c6338f8664b5f32d6ef0756a5afef64e50608dc.zip |
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>
Diffstat (limited to 'drivers/char/hw_random')
-rw-r--r-- | drivers/char/hw_random/stm32-rng.c | 2 |
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; |