aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/IR/ir-raw-event.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/IR/ir-raw-event.c')
-rw-r--r--drivers/media/IR/ir-raw-event.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/media/IR/ir-raw-event.c b/drivers/media/IR/ir-raw-event.c
index ea68a3f2effa..d3bd3f98e008 100644
--- a/drivers/media/IR/ir-raw-event.c
+++ b/drivers/media/IR/ir-raw-event.c
@@ -31,8 +31,9 @@ static DEFINE_SPINLOCK(ir_raw_handler_lock);
31 * 31 *
32 * Calls ir_raw_handler::ops for all registered IR handlers. It prevents 32 * Calls ir_raw_handler::ops for all registered IR handlers. It prevents
33 * new decode addition/removal while running, by locking ir_raw_handler_lock 33 * new decode addition/removal while running, by locking ir_raw_handler_lock
34 * mutex. If an error occurs, it stops the ops. Otherwise, it returns a sum 34 * mutex. If an error occurs, we keep going, as in the decode case, each
35 * of the return codes. 35 * decoder must have a crack at decoding the data. We return a sum of the
36 * return codes, which will be either 0 or negative for current callers.
36 */ 37 */
37#define RUN_DECODER(ops, ...) ({ \ 38#define RUN_DECODER(ops, ...) ({ \
38 struct ir_raw_handler *_ir_raw_handler; \ 39 struct ir_raw_handler *_ir_raw_handler; \
@@ -41,8 +42,6 @@ static DEFINE_SPINLOCK(ir_raw_handler_lock);
41 list_for_each_entry(_ir_raw_handler, &ir_raw_handler_list, list) { \ 42 list_for_each_entry(_ir_raw_handler, &ir_raw_handler_list, list) { \
42 if (_ir_raw_handler->ops) { \ 43 if (_ir_raw_handler->ops) { \
43 _rc = _ir_raw_handler->ops(__VA_ARGS__); \ 44 _rc = _ir_raw_handler->ops(__VA_ARGS__); \
44 if (_rc < 0) \
45 break; \
46 _sumrc += _rc; \ 45 _sumrc += _rc; \
47 } \ 46 } \
48 } \ 47 } \