diff options
author | Arnd Bergmann <arnd@arndb.de> | 2011-07-15 21:56:37 +0200 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2011-07-15 21:56:37 +0200 |
commit | 62778396020a29d742abf980c1e83f3df4b5426e (patch) | |
tree | 08dc01019a1afe6ed16ab79c627ecd81caea52e0 /drivers/media/rc/ir-raw.c | |
parent | 58f45e3c6f4fd2b9b9d7d43af71409a79a4b4cf6 (diff) | |
parent | d3144df5bd8eb1c8137cc92989e2e6bc9f2e5a27 (diff) | |
download | linux-62778396020a29d742abf980c1e83f3df4b5426e.tar.gz linux-62778396020a29d742abf980c1e83f3df4b5426e.tar.bz2 linux-62778396020a29d742abf980c1e83f3df4b5426e.zip |
Merge branch 'fixes-for-arnd' of git://git.pengutronix.de/git/imx/linux-2.6 into imx/fixes
Diffstat (limited to 'drivers/media/rc/ir-raw.c')
-rw-r--r-- | drivers/media/rc/ir-raw.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/rc/ir-raw.c b/drivers/media/rc/ir-raw.c index 11c19d8d0ee0..423ed45d6c55 100644 --- a/drivers/media/rc/ir-raw.c +++ b/drivers/media/rc/ir-raw.c @@ -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; |