aboutsummaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorMichael Hennerich <michael.hennerich@analog.com>2013-12-09 22:13:10 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2013-12-09 22:23:31 -0800
commit241ecf1ce528804d5ffc8fb386ff2a01b1f937c4 (patch)
tree3bac96d0f5c15a0250c7814f729399c7492abe5b /drivers/input
parente696c68363740d3a8fe495e353de3ff26b86257a (diff)
Input: adxl34x - Fix bug in definition of ADXL346_2D_ORIENT
Coverity report pointet out by Dmitry Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/misc/adxl34x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/misc/adxl34x.c b/drivers/input/misc/adxl34x.c
index 0735de3a646..1cb1da29441 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 */