Skip to content

Commit

Permalink
[media] rc-core: fix toggle handling in the rc6 decoder
Browse files Browse the repository at this point in the history
The toggle bit shouldn't be cleared before the toggle value is calculated.

This should probably go into 3.17.x as well.

Fixes: 120703f ([media] rc-core: document the protocol type)

Cc: stable@vger.kernel.org # For v3.17
Tested-by: Stephan Raue <mailinglists@openelec.tv>
Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  • Loading branch information
David Härdeman authored and Mauro Carvalho Chehab committed Nov 21, 2014
1 parent 009a541 commit d2a7458
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/rc/ir-rc6-decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,8 @@ static int ir_rc6_decode(struct rc_dev *dev, struct ir_raw_event ev)
case 32:
if ((scancode & RC6_6A_LCC_MASK) == RC6_6A_MCE_CC) {
protocol = RC_TYPE_RC6_MCE;
scancode &= ~RC6_6A_MCE_TOGGLE_MASK;
toggle = !!(scancode & RC6_6A_MCE_TOGGLE_MASK);
scancode &= ~RC6_6A_MCE_TOGGLE_MASK;
} else {
protocol = RC_BIT_RC6_6A_32;
toggle = 0;
Expand Down

0 comments on commit d2a7458

Please sign in to comment.