diff options
author | Dmitry Torokhov <dtor_core@ameritech.net> | 2005-05-29 03:29:25 -0400 |
---|---|---|
committer | Dmitry Torokhov <dtor_core@ameritech.net> | 2005-05-29 03:29:25 -0400 |
commit | 0fbf87caf70acec0c435233fbc39c7bd0aca3ca6 (patch) | |
tree | 65fa9bdde1f04a1359c3599d351199f834eb01ec /include/linux/input.h | |
parent | 58a007765bb5f16020e6000ecbdc5bcc6e54a147 (diff) |
Input: add semaphore and user count to input_dev structure;
serialize open and close calls and ensure that device's
open and close methods are only called when first user
opens it or last user closes it.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'include/linux/input.h')
-rw-r--r-- | include/linux/input.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/input.h b/include/linux/input.h index 72731d7d189e..43e8ecec602b 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -859,6 +859,10 @@ struct input_dev { | |||
859 | int (*erase_effect)(struct input_dev *dev, int effect_id); | 859 | int (*erase_effect)(struct input_dev *dev, int effect_id); |
860 | 860 | ||
861 | struct input_handle *grab; | 861 | struct input_handle *grab; |
862 | |||
863 | struct semaphore sem; /* serializes open and close operations */ | ||
864 | unsigned int users; | ||
865 | |||
862 | struct device *dev; | 866 | struct device *dev; |
863 | 867 | ||
864 | struct list_head h_list; | 868 | struct list_head h_list; |