]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Input: imx6ul_tsc - use the preferred method for kzalloc()
authorFabio Estevam <fabio.estevam@freescale.com>
Mon, 14 Sep 2015 17:37:31 +0000 (10:37 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 19 Sep 2015 18:41:54 +0000 (11:41 -0700)
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: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/imx6ul_tsc.c

index 4957d8b6ca59da47d62b52c125e02eca7d653ab6..67c73f2e7e3a3659dd89aafad669bd4f74156fa3 100644 (file)
@@ -347,7 +347,7 @@ static int imx6ul_tsc_probe(struct platform_device *pdev)
        int tsc_irq;
        int adc_irq;
 
-       tsc = devm_kzalloc(&pdev->dev, sizeof(struct imx6ul_tsc), GFP_KERNEL);
+       tsc = devm_kzalloc(&pdev->dev, sizeof(*tsc), GFP_KERNEL);
        if (!tsc)
                return -ENOMEM;