Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 254646
b: refs/heads/master
c: 3f5c4c7
h: refs/heads/master
v: v3
  • Loading branch information
Jarod Wilson authored and Mauro Carvalho Chehab committed Jul 1, 2011
1 parent 6ee1229 commit 01a18b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c4b0afee3c1730cf9b0f6ad21729928d23d3918e
refs/heads/master: 3f5c4c73322e4d6f3d40b697dac3073d2adffe41
4 changes: 3 additions & 1 deletion trunk/drivers/media/rc/ir-raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,18 +114,20 @@ int ir_raw_event_store_edge(struct rc_dev *dev, enum raw_event_type type)
s64 delta; /* ns */
DEFINE_IR_RAW_EVENT(ev);
int rc = 0;
int delay;

if (!dev->raw)
return -EINVAL;

now = ktime_get();
delta = ktime_to_ns(ktime_sub(now, dev->raw->last_event));
delay = MS_TO_NS(dev->input_dev->rep[REP_DELAY]);

/* Check for a long duration since last event or if we're
* being called for the first time, note that delta can't
* possibly be negative.
*/
if (delta > IR_MAX_DURATION || !dev->raw->last_type)
if (delta > delay || !dev->raw->last_type)
type |= IR_START_EVENT;
else
ev.duration = delta;
Expand Down

0 comments on commit 01a18b0

Please sign in to comment.