From: Guenter Roeck Date: Wed, 18 Jan 2017 19:41:51 +0000 (-0800) Subject: Input: soc_button_array - use 'dev' instead of dereferencing it X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=aa45590ae8581e25b909f2fed591c3499cd8e352;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c index 908b51089dee..fb3219a8d3c0 100644 --- a/drivers/input/misc/soc_button_array.c +++ b/drivers/input/misc/soc_button_array.c @@ -167,12 +167,12 @@ static int soc_button_probe(struct platform_device *pdev) button_info = (struct soc_button_info *)id->driver_data; - if (gpiod_count(&pdev->dev, KBUILD_MODNAME) <= 0) { - dev_dbg(&pdev->dev, "no GPIO attached, ignoring...\n"); + if (gpiod_count(dev, KBUILD_MODNAME) <= 0) { + dev_dbg(dev, "no GPIO attached, ignoring...\n"); return -ENODEV; } - priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); + priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); if (!priv) return -ENOMEM;