projects/linux·commit 241ecf1c

Input: adxl34x - Fix bug in definition of ADXL346_2D_ORIENT

241ecf1c · Michael Hennerich <[email protected]> · 2013-12-09 22:13:10 -08:00

Coverity report pointet out by Dmitry

Reported-by: Dmitry Torokhov <[email protected]>
Signed-off-by: Michael Hennerich <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Commit
241ecf1ce528804d5ffc8fb386ff2a01b1f937c4
Parents
e696c683

Changes

1 files changed · +1 −1

FileStatusAddDelContent
drivers/input/misc/adxl34x.cmodified+1−1View file

drivers/input/misc/adxl34x.c

View file
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 */