diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-03-25 20:13:43 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-17 23:53:00 -0400 |
commit | 93c312ff21b0a53e701a45741887208297646a1a (patch) | |
tree | cc17d43e5b1926228daacb4ea61d7be43f1c0c24 /include/media | |
parent | 995187bed30c0545e8da88372e9807da0a85911e (diff) |
V4L/DVB: ir-core: prepare to add more operations for ir decoders
Some decoders and a lirc_dev interface may need some other operations to work.
For example: IR device register/unregister and ir_keydown events may need to
be tracked.
As some operations can occur in interrupt time, and a lock is needed to prevent
un-registering a decode while decoding a key, the lock needed to be convert
into a spin lock.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/ir-core.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/include/media/ir-core.h b/include/media/ir-core.h index c377bf47a059..c704fa7cc11e 100644 --- a/include/media/ir-core.h +++ b/include/media/ir-core.h | |||
@@ -88,6 +88,8 @@ struct ir_raw_handler { | |||
88 | int (*decode)(struct input_dev *input_dev, | 88 | int (*decode)(struct input_dev *input_dev, |
89 | struct ir_raw_event *evs, | 89 | struct ir_raw_event *evs, |
90 | int len); | 90 | int len); |
91 | int (*raw_register)(struct input_dev *input_dev); | ||
92 | int (*raw_unregister)(struct input_dev *input_dev); | ||
91 | }; | 93 | }; |
92 | 94 | ||
93 | #define to_ir_input_dev(_attr) container_of(_attr, struct ir_input_dev, attr) | 95 | #define to_ir_input_dev(_attr) container_of(_attr, struct ir_input_dev, attr) |
@@ -116,12 +118,7 @@ int ir_raw_event_store(struct input_dev *input_dev, enum raw_event_type type); | |||
116 | int ir_raw_event_handle(struct input_dev *input_dev); | 118 | int ir_raw_event_handle(struct input_dev *input_dev); |
117 | int ir_raw_handler_register(struct ir_raw_handler *ir_raw_handler); | 119 | int ir_raw_handler_register(struct ir_raw_handler *ir_raw_handler); |
118 | void ir_raw_handler_unregister(struct ir_raw_handler *ir_raw_handler); | 120 | void ir_raw_handler_unregister(struct ir_raw_handler *ir_raw_handler); |
119 | |||
120 | #ifdef MODULE | ||
121 | void ir_raw_init(void); | 121 | void ir_raw_init(void); |
122 | #else | ||
123 | #define ir_raw_init() 0 | ||
124 | #endif | ||
125 | 122 | ||
126 | /* from ir-nec-decoder.c */ | 123 | /* from ir-nec-decoder.c */ |
127 | #ifdef CONFIG_IR_NEC_DECODER_MODULE | 124 | #ifdef CONFIG_IR_NEC_DECODER_MODULE |