summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2015-09-13 02:19:53 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2015-09-21 17:00:39 +0300
commit05db0ad8656376e341db6120758d04c247c9cf2f (patch)
tree84ce17e9abfe07f24b3057a1707f82c3f212a960 /drivers/char
parenteeb322540987d42a480cf8516fb88cda46347882 (diff)
downloadlinux-05db0ad8656376e341db6120758d04c247c9cf2f.tar.xz
hwrng: mxc-rnga - Use the preferred format for kzalloc
According to Documentation/CodingStyle: "The preferred form for passing a size of a struct is the following: p = kmalloc(sizeof(*p), ...);" ,so do as suggested. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/hw_random/mxc-rnga.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/char/hw_random/mxc-rnga.c b/drivers/char/hw_random/mxc-rnga.c
index ed2e3ef9f347..467362262651 100644
--- a/drivers/char/hw_random/mxc-rnga.c
+++ b/drivers/char/hw_random/mxc-rnga.c
@@ -145,8 +145,7 @@ static int __init mxc_rnga_probe(struct platform_device *pdev)
struct resource *res;
struct mxc_rng *mxc_rng;
- mxc_rng = devm_kzalloc(&pdev->dev, sizeof(struct mxc_rng),
- GFP_KERNEL);
+ mxc_rng = devm_kzalloc(&pdev->dev, sizeof(*mxc_rng), GFP_KERNEL);
if (!mxc_rng)
return -ENOMEM;