Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <fabio.estevam@freescale.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Fabio Estevam and committed by
Dmitry Torokhov
5eab3cf3 3905de62

+1 -1
+1 -1
drivers/input/touchscreen/imx6ul_tsc.c
··· 347 347 int tsc_irq; 348 348 int adc_irq; 349 349 350 - tsc = devm_kzalloc(&pdev->dev, sizeof(struct imx6ul_tsc), GFP_KERNEL); 350 + tsc = devm_kzalloc(&pdev->dev, sizeof(*tsc), GFP_KERNEL); 351 351 if (!tsc) 352 352 return -ENOMEM; 353 353