diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-03-31 13:40:35 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-17 23:53:03 -0400 |
commit | 716aab44df8bb9bdf16abea9013890274329b61f (patch) | |
tree | b83baf34bf18d35d51318044d8ea1ae80a275304 /include/media | |
parent | e202c15b4209f05fe109dd396463a524f4c2d3d8 (diff) |
V4L/DVB: ir-core: Add callbacks for input/evdev open/close on IR core
Especially when IR needs to do polling, it generates lots of wakeups per
second. This makes no sense, if the input event device is closed.
Adds a callback handler to the IR hardware driver, to allow registering
an open/close ops.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/ir-common.h | 1 | ||||
-rw-r--r-- | include/media/ir-core.h | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/include/media/ir-common.h b/include/media/ir-common.h index 87f2ec78deb8..e403a9a5281a 100644 --- a/include/media/ir-common.h +++ b/include/media/ir-common.h | |||
@@ -50,6 +50,7 @@ struct card_ir { | |||
50 | struct ir_input_state ir; | 50 | struct ir_input_state ir; |
51 | char name[32]; | 51 | char name[32]; |
52 | char phys[32]; | 52 | char phys[32]; |
53 | int users; | ||
53 | 54 | ||
54 | u32 running:1; | 55 | u32 running:1; |
55 | struct ir_dev_props props; | 56 | struct ir_dev_props props; |
diff --git a/include/media/ir-core.h b/include/media/ir-core.h index c704fa7cc11e..9a2f3084ffec 100644 --- a/include/media/ir-core.h +++ b/include/media/ir-core.h | |||
@@ -56,6 +56,8 @@ struct ir_dev_props { | |||
56 | unsigned long allowed_protos; | 56 | unsigned long allowed_protos; |
57 | void *priv; | 57 | void *priv; |
58 | int (*change_protocol)(void *priv, u64 ir_type); | 58 | int (*change_protocol)(void *priv, u64 ir_type); |
59 | int (*open)(void *priv); | ||
60 | void (*close)(void *priv); | ||
59 | }; | 61 | }; |
60 | 62 | ||
61 | struct ir_raw_event { | 63 | struct ir_raw_event { |