Input: serio - drop unnecessary calls to device_init_wakeup
authorGuenter Roeck <linux@roeck-us.net>
Sun, 22 Jan 2017 07:49:38 +0000 (23:49 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 22 Jan 2017 07:53:32 +0000 (23:53 -0800)
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>
drivers/input/serio/hyperv-keyboard.c

index c948866edf8705e6c538f52f140f8c0c01e9c336..25151d9214e05c8b6de3ee6bf146617d99740697 100644 (file)
@@ -402,7 +402,6 @@ static int hv_kbd_remove(struct hv_device *hv_dev)
 {
        struct hv_kbd_dev *kbd_dev = hv_get_drvdata(hv_dev);
 
-       device_init_wakeup(&hv_dev->device, false);
        serio_unregister_port(kbd_dev->hv_serio);
        vmbus_close(hv_dev->channel);
        kfree(kbd_dev);