From patchwork Fri Nov 26 21:37:49 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Hogan X-Patchwork-Id: 359952 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oAQLbwP0028841 for ; Fri, 26 Nov 2010 21:37:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751451Ab0KZVh4 (ORCPT ); Fri, 26 Nov 2010 16:37:56 -0500 Received: from mail-wy0-f174.google.com ([74.125.82.174]:34418 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751399Ab0KZVhz (ORCPT ); Fri, 26 Nov 2010 16:37:55 -0500 Received: by wyb28 with SMTP id 28so2381744wyb.19 for ; Fri, 26 Nov 2010 13:37:54 -0800 (PST) Received: by 10.227.7.90 with SMTP id c26mr2970338wbc.83.1290807473531; Fri, 26 Nov 2010 13:37:53 -0800 (PST) Received: from gandalf (jahogan.plus.com [212.159.75.221]) by mx.google.com with ESMTPS id b30sm1613988wbb.16.2010.11.26.13.37.51 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 26 Nov 2010 13:37:52 -0800 (PST) Date: Fri, 26 Nov 2010 21:37:49 +0000 From: James Hogan To: David =?iso-8859-1?Q?H=E4rdeman?= , Dmitry Torokhov , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] winbond-cir: fix extended NEC scancode encoding Message-ID: <20101126213749.GB21473@gandalf> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Fri, 26 Nov 2010 21:37:58 +0000 (UTC) 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;