diff options
author | James Hogan <james.hogan@imgtec.com> | 2014-01-16 19:56:22 -0300 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-11-18 11:54:36 +0900 |
commit | b225f71c8385dd9a01af2f90482b125a3abb397c (patch) | |
tree | 68c55053b9e3bf2fa1ca00ffaf23a986d294d6e7 /drivers/media | |
parent | ec5093ba506c97bc969b7261a7db3ad57ba08377 (diff) | |
download | linux-3.10-b225f71c8385dd9a01af2f90482b125a3abb397c.tar.gz linux-3.10-b225f71c8385dd9a01af2f90482b125a3abb397c.tar.bz2 linux-3.10-b225f71c8385dd9a01af2f90482b125a3abb397c.zip |
upstream: [media] media: rc: only turn on LED if keypress generated
Since v3.12, specifically 153a60bb0fac ([media] rc: add feedback led
trigger for rc keypresses), an LED trigger is activated on IR keydown
whether or not a keypress is generated (i.e. even if there's no matching
keycode). However the repeat and keyup logic isn't used unless there is
a keypress, which results in non-keypress keydown events turning on the
LED and not turning it off again.
On the assumption that the intent was for the LED only to light up on
valid key presses (you probably don't want it lighting up for the wrong
remote control for example), move the led_trigger_event() call inside
the keycode check.
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Acked-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/rc/rc-main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c index aa5d8e72462..ee81f25b26b 100644 --- a/drivers/media/rc/rc-main.c +++ b/drivers/media/rc/rc-main.c @@ -649,9 +649,10 @@ static void ir_do_keydown(struct rc_dev *dev, int scancode, "key 0x%04x, scancode 0x%04x\n", dev->input_name, keycode, scancode); input_report_key(dev->input_dev, keycode, 1); + + led_trigger_event(led_feedback, LED_FULL); } - led_trigger_event(led_feedback, LED_FULL); input_sync(dev->input_dev); } |