summaryrefslogtreecommitdiff
path: root/drivers/media/rc
diff options
context:
space:
mode:
authorJarod Wilson <jarod@redhat.com>2011-06-04 17:14:41 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-06-11 12:04:24 (GMT)
commit94215ccd99eb6e3c8a035c06984630bd7479d963 (patch)
tree706bec662dfb702687ca116e3854b8beba5bd924 /drivers/media/rc
parent443b391900469f2c5ec5a354ce305000096a94b7 (diff)
downloadlinux-fsl-qoriq-94215ccd99eb6e3c8a035c06984630bd7479d963.tar.xz
[media] imon: fix initial panel key repeat suppression
As pointed out on the lirc list by Andreas Dick, initial panel key repeat suppression wasn't working, as we had no timevals accumulated until after the first repeat. Also add a missing locking call. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/rc')
-rw-r--r--drivers/media/rc/imon.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c
index 43344fd..7136582 100644
--- a/drivers/media/rc/imon.c
+++ b/drivers/media/rc/imon.c
@@ -1590,16 +1590,16 @@ static void imon_incoming_packet(struct imon_context *ictx,
/* Only panel type events left to process now */
spin_lock_irqsave(&ictx->kc_lock, flags);
+ do_gettimeofday(&t);
/* KEY_MUTE repeats from knob need to be suppressed */
if (ictx->kc == KEY_MUTE && ictx->kc == ictx->last_keycode) {
- do_gettimeofday(&t);
msec = tv2int(&t, &prev_time);
- prev_time = t;
if (msec < ictx->idev->rep[REP_DELAY]) {
spin_unlock_irqrestore(&ictx->kc_lock, flags);
return;
}
}
+ prev_time = t;
kc = ictx->kc;
spin_unlock_irqrestore(&ictx->kc_lock, flags);
@@ -1611,7 +1611,9 @@ static void imon_incoming_packet(struct imon_context *ictx,
input_report_key(ictx->idev, kc, 0);
input_sync(ictx->idev);
+ spin_lock_irqsave(&ictx->kc_lock, flags);
ictx->last_keycode = kc;
+ spin_unlock_irqrestore(&ictx->kc_lock, flags);
return;