From 3e44d3ea3d312bb253fa5a87a29909206f31c2ec Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 20 Apr 2010 18:50:54 -0300 Subject: [PATCH] --- yaml --- r: 193008 b: refs/heads/master c: 384f23e8c9b189888d6d8c84ae5ebd23b074a0b6 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/media/IR/ir-core-priv.h | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index a93e2acd96cc..fc4df8c6374d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e40b1127f994a427568319d1be9b9e5ab1f58dd1 +refs/heads/master: 384f23e8c9b189888d6d8c84ae5ebd23b074a0b6 diff --git a/trunk/drivers/media/IR/ir-core-priv.h b/trunk/drivers/media/IR/ir-core-priv.h index 77d0b94ede10..f965024385d8 100644 --- a/trunk/drivers/media/IR/ir-core-priv.h +++ b/trunk/drivers/media/IR/ir-core-priv.h @@ -36,19 +36,23 @@ struct ir_raw_event_ctrl { }; /* macros for IR decoders */ -static inline bool geq_margin(unsigned d1, unsigned d2, unsigned margin) { +static inline bool geq_margin(unsigned d1, unsigned d2, unsigned margin) +{ return d1 > (d2 - margin); } -static inline bool eq_margin(unsigned d1, unsigned d2, unsigned margin) { +static inline bool eq_margin(unsigned d1, unsigned d2, unsigned margin) +{ return ((d1 > (d2 - margin)) && (d1 < (d2 + margin))); } -static inline bool is_transition(struct ir_raw_event *x, struct ir_raw_event *y) { +static inline bool is_transition(struct ir_raw_event *x, struct ir_raw_event *y) +{ return x->pulse != y->pulse; } -static inline void decrease_duration(struct ir_raw_event *ev, unsigned duration) { +static inline void decrease_duration(struct ir_raw_event *ev, unsigned duration) +{ if (duration > ev->duration) ev->duration = 0; else