From: David Härdeman Date: Thu, 20 Nov 2014 21:09:54 +0000 (-0300) Subject: [media] rc-core: fix toggle handling in the rc6 decoder X-Git-Tag: v4.14-rc1~6409^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d2a74581390d8e5ed09b12c9d4736847d918dfa6;p=platform%2Fkernel%2Flinux-rpi.git [media] rc-core: fix toggle handling in the rc6 decoder The toggle bit shouldn't be cleared before the toggle value is calculated. This should probably go into 3.17.x as well. Fixes: 120703f9eb32 ([media] rc-core: document the protocol type) Cc: stable@vger.kernel.org # For v3.17 Tested-by: Stephan Raue Signed-off-by: David Härdeman Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/rc/ir-rc6-decoder.c b/drivers/media/rc/ir-rc6-decoder.c index f1f098e..d16bc67 100644 --- a/drivers/media/rc/ir-rc6-decoder.c +++ b/drivers/media/rc/ir-rc6-decoder.c @@ -259,8 +259,8 @@ again: 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;