From patchwork Mon Dec 9 11:35:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hennerich, Michael" X-Patchwork-Id: 3310601 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 31C2F9F1F0 for ; Mon, 9 Dec 2013 11:42:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 27A02201BA for ; Mon, 9 Dec 2013 11:42:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0E6A42016C for ; Mon, 9 Dec 2013 11:42:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760961Ab3LILmH (ORCPT ); Mon, 9 Dec 2013 06:42:07 -0500 Received: from am1ehsobe002.messaging.microsoft.com ([213.199.154.205]:38775 "EHLO am1outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752783Ab3LILmG (ORCPT ); Mon, 9 Dec 2013 06:42:06 -0500 Received: from mail79-am1-R.bigfish.com (10.3.201.251) by AM1EHSOBE018.bigfish.com (10.3.207.140) with Microsoft SMTP Server id 14.1.225.22; Mon, 9 Dec 2013 11:42:04 +0000 Received: from mail79-am1 (localhost [127.0.0.1]) by mail79-am1-R.bigfish.com (Postfix) with ESMTP id 47AFD1201B2; Mon, 9 Dec 2013 11:42:04 +0000 (UTC) X-Forefront-Antispam-Report: CIP:137.71.25.57; KIP:(null); UIP:(null); IPV:NLI; H:nwd2mta2.analog.com; RD:nwd2mail11.analog.com; EFVD:NLI X-SpamScore: 0 X-BigFish: VPS0(zzzz1f42h208ch1ee6h1de0h1fdah2073h2146h1202h1e76h2189h1d1ah1d2ah1fc6hzz1de098h8275bh1de097hz2dh2a8h839hd24he5bhf0ah1288h12a5h12a9h12bdh12e5h1354h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1b0ah2222h224fh1d0ch1d2eh1d3fh1dc1h1dfeh1dffh1e23h1fe8h1ff5h2218h2216h226dh22d0h2327h2336h1155h) Received: from mail79-am1 (localhost.localdomain [127.0.0.1]) by mail79-am1 (MessageSwitch) id 1386589322347401_11135; Mon, 9 Dec 2013 11:42:02 +0000 (UTC) Received: from AM1EHSMHS007.bigfish.com (unknown [10.3.201.243]) by mail79-am1.bigfish.com (Postfix) with ESMTP id 50441340046; Mon, 9 Dec 2013 11:42:02 +0000 (UTC) Received: from nwd2mta2.analog.com (137.71.25.57) by AM1EHSMHS007.bigfish.com (10.3.207.107) with Microsoft SMTP Server (TLS) id 14.16.227.3; Mon, 9 Dec 2013 11:42:01 +0000 Received: from NWD2HUBCAS5.ad.analog.com (nwd2hubcas5.ad.analog.com [10.64.72.161]) by nwd2mta2.analog.com (8.13.8/8.13.8) with ESMTP id rB9DfGY6031139 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Mon, 9 Dec 2013 08:41:16 -0500 Received: from zeus.spd.analog.com (10.64.82.11) by NWD2HUBCAS5.ad.analog.com (10.64.72.161) with Microsoft SMTP Server id 14.3.158.1; Mon, 9 Dec 2013 06:41:20 -0500 Received: from localhost.localdomain ([10.44.2.88]) by zeus.spd.analog.com (8.14.6/8.14.6) with ESMTP id rB9BfIxw008497; Mon, 9 Dec 2013 06:41:19 -0500 From: To: CC: , Michael Hennerich Subject: [PATCH] drivers/input/misc/adxl34x: Fix bug in definition of ADXL346_2D_ORIENT Date: Mon, 9 Dec 2013 12:35:10 +0100 Message-ID: <1386588910-4604-1-git-send-email-michael.hennerich@analog.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-OriginatorOrg: analog.com X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Michael Hennerich Coverity report pointet out by Dmitry Reported-by: Dmitry Torokhov Signed-off-by: Michael Hennerich --- drivers/input/misc/adxl34x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/misc/adxl34x.c b/drivers/input/misc/adxl34x.c index 0735de3..1cb1da2 100644 --- a/drivers/input/misc/adxl34x.c +++ b/drivers/input/misc/adxl34x.c @@ -158,7 +158,7 @@ /* ORIENT ADXL346 only */ #define ADXL346_2D_VALID (1 << 6) -#define ADXL346_2D_ORIENT(x) (((x) & 0x3) >> 4) +#define ADXL346_2D_ORIENT(x) (((x) & 0x30) >> 4) #define ADXL346_3D_VALID (1 << 3) #define ADXL346_3D_ORIENT(x) ((x) & 0x7) #define ADXL346_2D_PORTRAIT_POS 0 /* +X */