@@ -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;