diff options
-rw-r--r-- | drivers/media/rc/imon.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c index 43344fd67130..7136582a8573 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, | |||
1590 | /* Only panel type events left to process now */ | 1590 | /* Only panel type events left to process now */ |
1591 | spin_lock_irqsave(&ictx->kc_lock, flags); | 1591 | spin_lock_irqsave(&ictx->kc_lock, flags); |
1592 | 1592 | ||
1593 | do_gettimeofday(&t); | ||
1593 | /* KEY_MUTE repeats from knob need to be suppressed */ | 1594 | /* KEY_MUTE repeats from knob need to be suppressed */ |
1594 | if (ictx->kc == KEY_MUTE && ictx->kc == ictx->last_keycode) { | 1595 | if (ictx->kc == KEY_MUTE && ictx->kc == ictx->last_keycode) { |
1595 | do_gettimeofday(&t); | ||
1596 | msec = tv2int(&t, &prev_time); | 1596 | msec = tv2int(&t, &prev_time); |
1597 | prev_time = t; | ||
1598 | if (msec < ictx->idev->rep[REP_DELAY]) { | 1597 | if (msec < ictx->idev->rep[REP_DELAY]) { |
1599 | spin_unlock_irqrestore(&ictx->kc_lock, flags); | 1598 | spin_unlock_irqrestore(&ictx->kc_lock, flags); |
1600 | return; | 1599 | return; |
1601 | } | 1600 | } |
1602 | } | 1601 | } |
1602 | prev_time = t; | ||
1603 | kc = ictx->kc; | 1603 | kc = ictx->kc; |
1604 | 1604 | ||
1605 | spin_unlock_irqrestore(&ictx->kc_lock, flags); | 1605 | spin_unlock_irqrestore(&ictx->kc_lock, flags); |
@@ -1611,7 +1611,9 @@ static void imon_incoming_packet(struct imon_context *ictx, | |||
1611 | input_report_key(ictx->idev, kc, 0); | 1611 | input_report_key(ictx->idev, kc, 0); |
1612 | input_sync(ictx->idev); | 1612 | input_sync(ictx->idev); |
1613 | 1613 | ||
1614 | spin_lock_irqsave(&ictx->kc_lock, flags); | ||
1614 | ictx->last_keycode = kc; | 1615 | ictx->last_keycode = kc; |
1616 | spin_unlock_irqrestore(&ictx->kc_lock, flags); | ||
1615 | 1617 | ||
1616 | return; | 1618 | return; |
1617 | 1619 | ||