From: <michael.hennerich@analog.com>
To: dmitry.torokhov@gmail.com
Cc: linux-input@vger.kernel.org,
Michael Hennerich <michael.hennerich@analog.com>
Subject: [PATCH] drivers/input/misc/adxl34x: Fix bug in definition of ADXL346_2D_ORIENT
Date: Mon, 9 Dec 2013 12:35:10 +0100 [thread overview]
Message-ID: <1386588910-4604-1-git-send-email-michael.hennerich@analog.com> (raw)
From: Michael Hennerich <michael.hennerich@analog.com>
Coverity report pointet out by Dmitry
Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
---
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 */
--
1.7.9.5
next reply other threads:[~2013-12-09 11:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-09 11:35 michael.hennerich [this message]
2013-12-10 6:14 ` [PATCH] drivers/input/misc/adxl34x: Fix bug in definition of ADXL346_2D_ORIENT Dmitry Torokhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1386588910-4604-1-git-send-email-michael.hennerich@analog.com \
--to=michael.hennerich@analog.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).