summaryrefslogtreecommitdiffstats
path: root/drivers/input/misc
diff options
context:
space:
mode:
authorGuenter Roeck2017-01-18 20:41:51 +0100
committerDmitry Torokhov2017-01-18 20:49:16 +0100
commitaa45590ae8581e25b909f2fed591c3499cd8e352 (patch)
tree4006fc0ea811c929c8351232d38d3a70b6f45101 /drivers/input/misc
parentInput: mma8450 - drop unnecessary call to i2c_set_clientdata (diff)
downloadkernel-qcow2-linux-aa45590ae8581e25b909f2fed591c3499cd8e352.tar.gz
kernel-qcow2-linux-aa45590ae8581e25b909f2fed591c3499cd8e352.tar.xz
kernel-qcow2-linux-aa45590ae8581e25b909f2fed591c3499cd8e352.zip
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>
Diffstat (limited to 'drivers/input/misc')
-rw-r--r--drivers/input/misc/soc_button_array.c6
1 files changed, 3 insertions, 3 deletions
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;