aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard/cros_ec_keyb.c
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2017-01-18 10:37:49 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2017-01-18 11:33:00 -0800
commit2057e15945a8b5d867c086371a5fb946fd8221da (patch)
treef9c17f6d3c71958c5082c89aadd2fe0a44b023bc /drivers/input/keyboard/cros_ec_keyb.c
parentInput: tca8418 - use the interrupt trigger from the device tree (diff)
downloadlinux-dev-2057e15945a8b5d867c086371a5fb946fd8221da.tar.xz
linux-dev-2057e15945a8b5d867c086371a5fb946fd8221da.zip
Input: cros_ec_keyb - drop unnecessary call to dev_set_drvdata and other changes
There is no call to platform_get_drvdata() or dev_get_drvdata(). Drop the unnecessary call to dev_set_drvdata(). Other relevant changes: Use existing variable 'dev' instead of dereferencing it several times This conversion was done automatically with coccinelle using the following semantic patches. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches - Drop dev_set_drvdata() - Use local variable 'struct device *dev' consistently Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/keyboard/cros_ec_keyb.c')
-rw-r--r--drivers/input/keyboard/cros_ec_keyb.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c
index 4b0878f35471..165c722408aa 100644
--- a/drivers/input/keyboard/cros_ec_keyb.c
+++ b/drivers/input/keyboard/cros_ec_keyb.c
@@ -242,7 +242,7 @@ static int cros_ec_keyb_probe(struct platform_device *pdev)
struct device_node *np;
int err;
- np = pdev->dev.of_node;
+ np = dev->of_node;
if (!np)
return -ENODEV;
@@ -272,7 +272,6 @@ static int cros_ec_keyb_probe(struct platform_device *pdev)
ckdev->ec = ec;
ckdev->dev = dev;
- dev_set_drvdata(dev, ckdev);
idev->name = CROS_EC_DEV_NAME;
idev->phys = ec->phys_name;