From: Fabio Estevam Date: Mon, 14 Sep 2015 17:37:31 +0000 (-0700) Subject: Input: imx6ul_tsc - use the preferred method for kzalloc() X-Git-Tag: v4.3-rc4~9^2~11 X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-linux.git;a=commitdiff_plain;h=5eab3cf3e48cf658f3432e8ba31436d5a4f6a219 Input: imx6ul_tsc - use the preferred method 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 Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/touchscreen/imx6ul_tsc.c b/drivers/input/touchscreen/imx6ul_tsc.c index 4957d8b6ca59..67c73f2e7e3a 100644 --- a/drivers/input/touchscreen/imx6ul_tsc.c +++ b/drivers/input/touchscreen/imx6ul_tsc.c @@ -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;