diff options
author | Guenter Roeck <linux@roeck-us.net> | 2017-01-22 20:17:40 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-01-22 20:22:25 -0500 |
commit | 14fdb924afd9290d43e64eeb2377d51806de1197 (patch) | |
tree | 45294cb8c286a7f56cacb552c89686d8a2838a1f | |
parent | 2ea9c2362b562e227a944e0ae370c9868024884e (diff) |
Input: keyboard - drop unnecessary calls to input_set_drvdata
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>
-rw-r--r-- | drivers/input/keyboard/adp5520-keys.c | 2 | ||||
-rw-r--r-- | drivers/input/keyboard/bf54x-keys.c | 2 | ||||
-rw-r--r-- | drivers/input/keyboard/maple_keyb.c | 1 | ||||
-rw-r--r-- | drivers/input/keyboard/opencores-kbd.c | 2 | ||||
-rw-r--r-- | drivers/input/keyboard/tca8418_keypad.c | 2 | ||||
-rw-r--r-- | drivers/input/keyboard/tm2-touchkey.c | 2 |
6 files changed, 0 insertions, 11 deletions
diff --git a/drivers/input/keyboard/adp5520-keys.c b/drivers/input/keyboard/adp5520-keys.c index db1004dad108..f0b9b37bde58 100644 --- a/drivers/input/keyboard/adp5520-keys.c +++ b/drivers/input/keyboard/adp5520-keys.c | |||
@@ -107,8 +107,6 @@ static int adp5520_keys_probe(struct platform_device *pdev) | |||
107 | input->phys = "adp5520-keys/input0"; | 107 | input->phys = "adp5520-keys/input0"; |
108 | input->dev.parent = &pdev->dev; | 108 | input->dev.parent = &pdev->dev; |
109 | 109 | ||
110 | input_set_drvdata(input, dev); | ||
111 | |||
112 | input->id.bustype = BUS_I2C; | 110 | input->id.bustype = BUS_I2C; |
113 | input->id.vendor = 0x0001; | 111 | input->id.vendor = 0x0001; |
114 | input->id.product = 0x5520; | 112 | input->id.product = 0x5520; |
diff --git a/drivers/input/keyboard/bf54x-keys.c b/drivers/input/keyboard/bf54x-keys.c index 81b07dddae86..39bcbc38997f 100644 --- a/drivers/input/keyboard/bf54x-keys.c +++ b/drivers/input/keyboard/bf54x-keys.c | |||
@@ -268,8 +268,6 @@ static int bfin_kpad_probe(struct platform_device *pdev) | |||
268 | input->phys = "bf54x-keys/input0"; | 268 | input->phys = "bf54x-keys/input0"; |
269 | input->dev.parent = &pdev->dev; | 269 | input->dev.parent = &pdev->dev; |
270 | 270 | ||
271 | input_set_drvdata(input, bf54x_kpad); | ||
272 | |||
273 | input->id.bustype = BUS_HOST; | 271 | input->id.bustype = BUS_HOST; |
274 | input->id.vendor = 0x0001; | 272 | input->id.vendor = 0x0001; |
275 | input->id.product = 0x0001; | 273 | input->id.product = 0x0001; |
diff --git a/drivers/input/keyboard/maple_keyb.c b/drivers/input/keyboard/maple_keyb.c index 5aa2361aef95..78e3567ec18c 100644 --- a/drivers/input/keyboard/maple_keyb.c +++ b/drivers/input/keyboard/maple_keyb.c | |||
@@ -196,7 +196,6 @@ static int probe_maple_kbd(struct device *dev) | |||
196 | __clear_bit(KEY_RESERVED, idev->keybit); | 196 | __clear_bit(KEY_RESERVED, idev->keybit); |
197 | 197 | ||
198 | input_set_capability(idev, EV_MSC, MSC_SCAN); | 198 | input_set_capability(idev, EV_MSC, MSC_SCAN); |
199 | input_set_drvdata(idev, kbd); | ||
200 | 199 | ||
201 | error = input_register_device(idev); | 200 | error = input_register_device(idev); |
202 | if (error) | 201 | if (error) |
diff --git a/drivers/input/keyboard/opencores-kbd.c b/drivers/input/keyboard/opencores-kbd.c index 98ea6190f5f5..d62b4068c077 100644 --- a/drivers/input/keyboard/opencores-kbd.c +++ b/drivers/input/keyboard/opencores-kbd.c | |||
@@ -75,8 +75,6 @@ static int opencores_kbd_probe(struct platform_device *pdev) | |||
75 | input->name = pdev->name; | 75 | input->name = pdev->name; |
76 | input->phys = "opencores-kbd/input0"; | 76 | input->phys = "opencores-kbd/input0"; |
77 | 77 | ||
78 | input_set_drvdata(input, opencores_kbd); | ||
79 | |||
80 | input->id.bustype = BUS_HOST; | 78 | input->id.bustype = BUS_HOST; |
81 | input->id.vendor = 0x0001; | 79 | input->id.vendor = 0x0001; |
82 | input->id.product = 0x0001; | 80 | input->id.product = 0x0001; |
diff --git a/drivers/input/keyboard/tca8418_keypad.c b/drivers/input/keyboard/tca8418_keypad.c index 11d5c76d9fb4..9f6308fac0b4 100644 --- a/drivers/input/keyboard/tca8418_keypad.c +++ b/drivers/input/keyboard/tca8418_keypad.c | |||
@@ -358,8 +358,6 @@ static int tca8418_keypad_probe(struct i2c_client *client, | |||
358 | __set_bit(EV_REP, input->evbit); | 358 | __set_bit(EV_REP, input->evbit); |
359 | input_set_capability(input, EV_MSC, MSC_SCAN); | 359 | input_set_capability(input, EV_MSC, MSC_SCAN); |
360 | 360 | ||
361 | input_set_drvdata(input, keypad_data); | ||
362 | |||
363 | irq = client->irq; | 361 | irq = client->irq; |
364 | if (irq_is_gpio) | 362 | if (irq_is_gpio) |
365 | irq = gpio_to_irq(irq); | 363 | irq = gpio_to_irq(irq); |
diff --git a/drivers/input/keyboard/tm2-touchkey.c b/drivers/input/keyboard/tm2-touchkey.c index 916e2f3a9bbb..485900f953e0 100644 --- a/drivers/input/keyboard/tm2-touchkey.c +++ b/drivers/input/keyboard/tm2-touchkey.c | |||
@@ -193,8 +193,6 @@ static int tm2_touchkey_probe(struct i2c_client *client, | |||
193 | input_set_capability(touchkey->input_dev, EV_KEY, KEY_PHONE); | 193 | input_set_capability(touchkey->input_dev, EV_KEY, KEY_PHONE); |
194 | input_set_capability(touchkey->input_dev, EV_KEY, KEY_BACK); | 194 | input_set_capability(touchkey->input_dev, EV_KEY, KEY_BACK); |
195 | 195 | ||
196 | input_set_drvdata(touchkey->input_dev, touchkey); | ||
197 | |||
198 | error = input_register_device(touchkey->input_dev); | 196 | error = input_register_device(touchkey->input_dev); |
199 | if (error) { | 197 | if (error) { |
200 | dev_err(&client->dev, | 198 | dev_err(&client->dev, |