提交 241ecf1c 编写于 作者: M Michael Hennerich 提交者: Dmitry Torokhov

Input: adxl34x - Fix bug in definition of ADXL346_2D_ORIENT

Coverity report pointet out by Dmitry
Reported-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: NMichael Hennerich <michael.hennerich@analog.com>
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 e696c683
...@@ -158,7 +158,7 @@ ...@@ -158,7 +158,7 @@
/* ORIENT ADXL346 only */ /* ORIENT ADXL346 only */
#define ADXL346_2D_VALID (1 << 6) #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_VALID (1 << 3)
#define ADXL346_3D_ORIENT(x) ((x) & 0x7) #define ADXL346_3D_ORIENT(x) ((x) & 0x7)
#define ADXL346_2D_PORTRAIT_POS 0 /* +X */ #define ADXL346_2D_PORTRAIT_POS 0 /* +X */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册