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

Input: soc_button_array - use 'dev' instead of dereferencing it

Use local variable 'dev' instead of dereferencing it several times.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Guenter Roeck and committed by
Dmitry Torokhov
aa45590a 9e85aa69

+3 -3
+3 -3
drivers/input/misc/soc_button_array.c
··· 167 167 168 168 button_info = (struct soc_button_info *)id->driver_data; 169 169 170 - if (gpiod_count(&pdev->dev, KBUILD_MODNAME) <= 0) { 171 - dev_dbg(&pdev->dev, "no GPIO attached, ignoring...\n"); 170 + if (gpiod_count(dev, KBUILD_MODNAME) <= 0) { 171 + dev_dbg(dev, "no GPIO attached, ignoring...\n"); 172 172 return -ENODEV; 173 173 } 174 174 175 - priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); 175 + priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); 176 176 if (!priv) 177 177 return -ENOMEM; 178 178