]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Input: keyboard - drop unnecessary calls to input_set_drvdata
authorGuenter Roeck <linux@roeck-us.net>
Mon, 23 Jan 2017 01:17:40 +0000 (17:17 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 23 Jan 2017 01:22:25 +0000 (17:22 -0800)
If there is no call to dev_get_drvdata() or input_get_drvdata(),
the call to input_set_drvdata() is unnecessary and can be dropped.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/keyboard/adp5520-keys.c
drivers/input/keyboard/bf54x-keys.c
drivers/input/keyboard/maple_keyb.c
drivers/input/keyboard/opencores-kbd.c
drivers/input/keyboard/tca8418_keypad.c
drivers/input/keyboard/tm2-touchkey.c

index db1004dad10819d55689e4293d93328e08eac3b5..f0b9b37bde5854275f045bbe71f38b89f4afcd6c 100644 (file)
@@ -107,8 +107,6 @@ static int adp5520_keys_probe(struct platform_device *pdev)
        input->phys = "adp5520-keys/input0";
        input->dev.parent = &pdev->dev;
 
-       input_set_drvdata(input, dev);
-
        input->id.bustype = BUS_I2C;
        input->id.vendor = 0x0001;
        input->id.product = 0x5520;
index 81b07dddae86e93dbbf46a7c6af9c05ad66a1c94..39bcbc38997fcd193a5f2bbfc51f1494b5b39c1e 100644 (file)
@@ -268,8 +268,6 @@ static int bfin_kpad_probe(struct platform_device *pdev)
        input->phys = "bf54x-keys/input0";
        input->dev.parent = &pdev->dev;
 
-       input_set_drvdata(input, bf54x_kpad);
-
        input->id.bustype = BUS_HOST;
        input->id.vendor = 0x0001;
        input->id.product = 0x0001;
index 5aa2361aef95be73080e1392185ac57a2275a220..78e3567ec18c39e14e51d62d6a2c673caa116431 100644 (file)
@@ -196,7 +196,6 @@ static int probe_maple_kbd(struct device *dev)
        __clear_bit(KEY_RESERVED, idev->keybit);
 
        input_set_capability(idev, EV_MSC, MSC_SCAN);
-       input_set_drvdata(idev, kbd);
 
        error = input_register_device(idev);
        if (error)
index 98ea6190f5f5f537f817b7c5689ec44728f8a316..d62b4068c077993fb1cd1c7de3551062a40d4421 100644 (file)
@@ -75,8 +75,6 @@ static int opencores_kbd_probe(struct platform_device *pdev)
        input->name = pdev->name;
        input->phys = "opencores-kbd/input0";
 
-       input_set_drvdata(input, opencores_kbd);
-
        input->id.bustype = BUS_HOST;
        input->id.vendor = 0x0001;
        input->id.product = 0x0001;
index 11d5c76d9fb415a5a627e0798c481e775b6b1b31..9f6308fac0b46b1b63148ae361ece213de405b2b 100644 (file)
@@ -358,8 +358,6 @@ static int tca8418_keypad_probe(struct i2c_client *client,
                __set_bit(EV_REP, input->evbit);
        input_set_capability(input, EV_MSC, MSC_SCAN);
 
-       input_set_drvdata(input, keypad_data);
-
        irq = client->irq;
        if (irq_is_gpio)
                irq = gpio_to_irq(irq);
index 916e2f3a9bbbac96aaea22959deb071948345d46..485900f953e088ca91d0b1b538be6f6cc3ad6794 100644 (file)
@@ -193,8 +193,6 @@ static int tm2_touchkey_probe(struct i2c_client *client,
        input_set_capability(touchkey->input_dev, EV_KEY, KEY_PHONE);
        input_set_capability(touchkey->input_dev, EV_KEY, KEY_BACK);
 
-       input_set_drvdata(touchkey->input_dev, touchkey);
-
        error = input_register_device(touchkey->input_dev);
        if (error) {
                dev_err(&client->dev,