drivers/input/misc/adxl34x: Fix bug in definition of ADXL346_2D_ORIENT
[email protected]
maintainerPATCH 1/1 drivers/input/misc/adxl34x: Fix bug in definition of ADXL346_2D_ORIENT
From: Michael Hennerich <[email protected]>
Coverity report pointet out by Dmitry
Reported-by Dmitry Torokhov <[email protected]>
Signed-off-by Michael Hennerich <[email protected]>
--- drivers/input/misc/adxl34x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/misc/adxl34x.c +1 -1
@@ -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 */
Signature · 1 line
1.7.9.5
Quoted 6 lines · On Mon, Dec 09, 2013 at 12:35:10PM +0100, [email protected] wrote:
From: Michael Hennerich <[email protected]>
Coverity report pointet out by Dmitry
Reported-by Dmitry Torokhov <[email protected]>Signed-off-by Michael Hennerich <[email protected]>
Applied, thank you.
Quoted 21 lines
--- drivers/input/misc/adxl34x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/input/misc/adxl34x.c +1
-1@@ -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 */ Signature · 1 line
1.7.9.5
Signature · 1 line
Dmitry