summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLawrence Rust <lvr@softsystem.co.uk>2011-04-08 14:50:45 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-05-04 21:30:20 +0200
commit2a164d02dd34c6b49a3f0995900e0f8af102b804 (patch)
tree1b4ed3a96d4e5ce6fe6b5b226b6f4b8416811a2d /drivers
parent[media] v4l: Release module if subdev registration fails (diff)
downloadlinux-2a164d02dd34c6b49a3f0995900e0f8af102b804.tar.xz
linux-2a164d02dd34c6b49a3f0995900e0f8af102b804.zip
[media] Fix cx88 remote control input
In the IR interrupt handler of cx88-input.c there's a 32-bit multiply overflow which causes IR pulse durations to be incorrectly calculated. This is a regression caused by commit 2997137be8eba. Cc: stable@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/cx88/cx88-input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/cx88/cx88-input.c b/drivers/media/video/cx88/cx88-input.c
index c820e2f53527..3f442003623d 100644
--- a/drivers/media/video/cx88/cx88-input.c
+++ b/drivers/media/video/cx88/cx88-input.c
@@ -524,7 +524,7 @@ void cx88_ir_irq(struct cx88_core *core)
for (todo = 32; todo > 0; todo -= bits) {
ev.pulse = samples & 0x80000000 ? false : true;
bits = min(todo, 32U - fls(ev.pulse ? samples : ~samples));
- ev.duration = (bits * NSEC_PER_SEC) / (1000 * ir_samplerate);
+ ev.duration = (bits * (NSEC_PER_SEC / 1000)) / ir_samplerate;
ir_raw_event_store_with_filter(ir->dev, &ev);
samples <<= bits;
}