summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2017-01-22 02:47:44 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2017-01-22 02:53:19 -0500
commitde3a00ef21d6e803ee7c674c76a269016a1b308c (patch)
treeac7f09d1d5f019eba6a3c4c25dc47fd2769a6070
parentd7ddf15414dd598b9b875664e6b7aebe6c988f5d (diff)
Input: keyboard - drop unnecessary calls to device_init_wakeup
Calling device_init_wakeup in the remove function is unnecessary since the device is going away, and thus won't be able to cause any wakeups under any circumstances. Besides, the driver cleanup code already handles the necessary cleanup. Similarly, disabling wakeup in the probe error path is unnecessary, as is disabling wakeup in the probe function in the first place. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r--drivers/input/keyboard/gpio_keys.c2
-rw-r--r--drivers/input/keyboard/matrix_keypad.c2
-rw-r--r--drivers/input/keyboard/omap4-keypad.c3
-rw-r--r--drivers/input/keyboard/samsung-keypad.c2
-rw-r--r--drivers/input/keyboard/spear-keyboard.c2
5 files changed, 0 insertions, 11 deletions
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
index 50b19b952698..9c92cdf196e3 100644
--- a/drivers/input/keyboard/gpio_keys.c
+++ b/drivers/input/keyboard/gpio_keys.c
@@ -845,8 +845,6 @@ static int gpio_keys_remove(struct platform_device *pdev)
845{ 845{
846 sysfs_remove_group(&pdev->dev.kobj, &gpio_keys_attr_group); 846 sysfs_remove_group(&pdev->dev.kobj, &gpio_keys_attr_group);
847 847
848 device_init_wakeup(&pdev->dev, 0);
849
850 return 0; 848 return 0;
851} 849}
852 850
diff --git a/drivers/input/keyboard/matrix_keypad.c b/drivers/input/keyboard/matrix_keypad.c
index 7f12b6579f82..18839cd5f76e 100644
--- a/drivers/input/keyboard/matrix_keypad.c
+++ b/drivers/input/keyboard/matrix_keypad.c
@@ -545,8 +545,6 @@ static int matrix_keypad_remove(struct platform_device *pdev)
545{ 545{
546 struct matrix_keypad *keypad = platform_get_drvdata(pdev); 546 struct matrix_keypad *keypad = platform_get_drvdata(pdev);
547 547
548 device_init_wakeup(&pdev->dev, 0);
549
550 matrix_keypad_free_gpio(keypad); 548 matrix_keypad_free_gpio(keypad);
551 input_unregister_device(keypad->input_dev); 549 input_unregister_device(keypad->input_dev);
552 kfree(keypad); 550 kfree(keypad);
diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c
index 6639b2b8528a..9ecb16701b13 100644
--- a/drivers/input/keyboard/omap4-keypad.c
+++ b/drivers/input/keyboard/omap4-keypad.c
@@ -375,7 +375,6 @@ static int omap4_keypad_probe(struct platform_device *pdev)
375 375
376err_pm_disable: 376err_pm_disable:
377 pm_runtime_disable(&pdev->dev); 377 pm_runtime_disable(&pdev->dev);
378 device_init_wakeup(&pdev->dev, false);
379 free_irq(keypad_data->irq, keypad_data); 378 free_irq(keypad_data->irq, keypad_data);
380err_free_keymap: 379err_free_keymap:
381 kfree(keypad_data->keymap); 380 kfree(keypad_data->keymap);
@@ -401,8 +400,6 @@ static int omap4_keypad_remove(struct platform_device *pdev)
401 400
402 pm_runtime_disable(&pdev->dev); 401 pm_runtime_disable(&pdev->dev);
403 402
404 device_init_wakeup(&pdev->dev, false);
405
406 input_unregister_device(keypad_data->input); 403 input_unregister_device(keypad_data->input);
407 404
408 iounmap(keypad_data->base); 405 iounmap(keypad_data->base);
diff --git a/drivers/input/keyboard/samsung-keypad.c b/drivers/input/keyboard/samsung-keypad.c
index 4e319eb9e19d..316414465c77 100644
--- a/drivers/input/keyboard/samsung-keypad.c
+++ b/drivers/input/keyboard/samsung-keypad.c
@@ -445,7 +445,6 @@ static int samsung_keypad_probe(struct platform_device *pdev)
445 445
446err_disable_runtime_pm: 446err_disable_runtime_pm:
447 pm_runtime_disable(&pdev->dev); 447 pm_runtime_disable(&pdev->dev);
448 device_init_wakeup(&pdev->dev, 0);
449err_unprepare_clk: 448err_unprepare_clk:
450 clk_unprepare(keypad->clk); 449 clk_unprepare(keypad->clk);
451 return error; 450 return error;
@@ -456,7 +455,6 @@ static int samsung_keypad_remove(struct platform_device *pdev)
456 struct samsung_keypad *keypad = platform_get_drvdata(pdev); 455 struct samsung_keypad *keypad = platform_get_drvdata(pdev);
457 456
458 pm_runtime_disable(&pdev->dev); 457 pm_runtime_disable(&pdev->dev);
459 device_init_wakeup(&pdev->dev, 0);
460 458
461 input_unregister_device(keypad->input_dev); 459 input_unregister_device(keypad->input_dev);
462 460
diff --git a/drivers/input/keyboard/spear-keyboard.c b/drivers/input/keyboard/spear-keyboard.c
index 8083eaa0524a..7d25fa338ab4 100644
--- a/drivers/input/keyboard/spear-keyboard.c
+++ b/drivers/input/keyboard/spear-keyboard.c
@@ -283,8 +283,6 @@ static int spear_kbd_remove(struct platform_device *pdev)
283 input_unregister_device(kbd->input); 283 input_unregister_device(kbd->input);
284 clk_unprepare(kbd->clk); 284 clk_unprepare(kbd->clk);
285 285
286 device_init_wakeup(&pdev->dev, 0);
287
288 return 0; 286 return 0;
289} 287}
290 288