diff options
author | Maxim Levitsky <maximlevitsky@gmail.com> | 2010-07-31 11:59:15 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-08-08 23:42:59 -0300 |
commit | 510fcb70ff375b0cec6638fcfafdf36233690bfc (patch) | |
tree | 7bed17c4061ce4af6acc1a9445ad7ae3da80b3b6 /drivers/media/IR/ir-core-priv.h | |
parent | ade321c5b8a0e4d40c0f3b73bf0d2579850028d0 (diff) | |
download | talos-op-linux-510fcb70ff375b0cec6638fcfafdf36233690bfc.tar.gz talos-op-linux-510fcb70ff375b0cec6638fcfafdf36233690bfc.zip |
V4L/DVB: IR: minor fixes
* lirc: Don't propagate reset event to userspace
* lirc: Remove strange logic from lirc that would make first sample always be pulse
* Make TO_US macro actualy print what it should.
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/IR/ir-core-priv.h')
-rw-r--r-- | drivers/media/IR/ir-core-priv.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/media/IR/ir-core-priv.h b/drivers/media/IR/ir-core-priv.h index babd52061bc3..dc26e2beeefb 100644 --- a/drivers/media/IR/ir-core-priv.h +++ b/drivers/media/IR/ir-core-priv.h @@ -76,7 +76,6 @@ struct ir_raw_event_ctrl { struct lirc_codec { struct ir_input_dev *ir_dev; struct lirc_driver *drv; - int lircdata; } lirc; }; @@ -104,10 +103,9 @@ static inline void decrease_duration(struct ir_raw_event *ev, unsigned duration) ev->duration -= duration; } -#define TO_US(duration) (((duration) + 500) / 1000) +#define TO_US(duration) DIV_ROUND_CLOSEST((duration), 1000) #define TO_STR(is_pulse) ((is_pulse) ? "pulse" : "space") #define IS_RESET(ev) (ev.duration == 0) - /* * Routines from ir-sysfs.c - Meant to be called only internally inside * ir-core |