diff mbox

winbond-cir: fix extended NEC scancode encoding

Message ID 20101126213749.GB21473@gandalf (mailing list archive)
State New, archived
Headers show

Commit Message

James Hogan Nov. 26, 2010, 9:37 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/input/misc/winbond-cir.c b/drivers/input/misc/winbond-cir.c
index 64f1de7..01a9069 100644
--- a/drivers/input/misc/winbond-cir.c
+++ b/drivers/input/misc/winbond-cir.c
@@ -851,8 +851,8 @@  wbcir_parse_nec(struct device *dev, struct wbcir_data *data)
 	 * and Command2 was the inverse of Command1 and were used as
 	 * an error check.
 	 *
-	 * With NEC extended, Address1 is the LSB of the Address and
-	 * Address2 is the MSB, Command parsing remains unchanged.
+	 * With NEC extended, Address1 is the MSB of the Address and
+	 * Address2 is the LSB, Command parsing remains unchanged.
 	 *
 	 * A repeat message is coded as:
 	 * Leader		- 9 ms burst
@@ -916,7 +916,7 @@  wbcir_parse_nec(struct device *dev, struct wbcir_data *data)
 	/* Check for extended NEC protocol */
 	address = address1;
 	if (address1 != ~address2)
-		address |= address2 << 8;
+		address = address << 8 | address2;
 
 	scancode = address << 8 | command1;