When closing polled input device, call optional closing method to make it possible to turn off the HW. Signed-off-by: Samu Onkalo <samu.p.onkalo@xxxxxxxxx> --- drivers/input/input-polldev.c | 3 +++ include/linux/input-polldev.h | 1 + 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/input/input-polldev.c b/drivers/input/input-polldev.c index 0d3ce7a..50e1cb4 100644 --- a/drivers/input/input-polldev.c +++ b/drivers/input/input-polldev.c @@ -95,6 +95,9 @@ static void input_close_polled_device(struct input_dev *input) cancel_delayed_work_sync(&dev->work); input_polldev_stop_workqueue(); + + if (dev->close) + dev->close(dev); } /** diff --git a/include/linux/input-polldev.h b/include/linux/input-polldev.h index 597a007..23a6fc6 100644 --- a/include/linux/input-polldev.h +++ b/include/linux/input-polldev.h @@ -32,6 +32,7 @@ struct input_polled_dev { void (*flush)(struct input_polled_dev *dev); void (*poll)(struct input_polled_dev *dev); + void (*close)(struct input_polled_dev *dev); unsigned int poll_interval; /* msec */ struct input_dev *input; -- 1.5.6.3 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html