Re: [PATCH 1/1] Polled input device: add device open and close methods
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2009-10-14 08:01:39
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2009-10-14 08:01:39
On Tue, Oct 13, 2009 at 09:24:48AM +0300, Samu Onkalo wrote:
Optional open and close methods for preparing and closing the device. Signed-off-by: Samu Onkalo <redacted> --- drivers/input/input-polldev.c | 6 ++++++ include/linux/input-polldev.h | 2 ++ 2 files changed, 8 insertions(+), 0 deletions(-)diff --git a/drivers/input/input-polldev.c b/drivers/input/input-polldev.c index 0d3ce7a..0ad788b 100644 --- a/drivers/input/input-polldev.c +++ b/drivers/input/input-polldev.c@@ -80,6 +80,9 @@ static int input_open_polled_device(struct input_dev *input) if (error) return error; + if (dev->open) + dev->open(dev); + if (dev->flush) dev->flush(dev);
Hmm... I think having both open and flush is overkill. My fault for not looking closer, I will kill the flush and convert existing users to open. -- Dmitry