diff options
Diffstat (limited to 'drivers/input/misc/mma8450.c')
-rw-r--r-- | drivers/input/misc/mma8450.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/input/misc/mma8450.c b/drivers/input/misc/mma8450.c index 480557f14f23..f3309696d053 100644 --- a/drivers/input/misc/mma8450.c +++ b/drivers/input/misc/mma8450.c @@ -123,9 +123,9 @@ static void mma8450_poll(struct input_polled_dev *dev) if (ret < 0) return; - x = ((buf[1] << 4) & 0xff0) | (buf[0] & 0xf); - y = ((buf[3] << 4) & 0xff0) | (buf[2] & 0xf); - z = ((buf[5] << 4) & 0xff0) | (buf[4] & 0xf); + x = ((int)(s8)buf[1] << 4) | (buf[0] & 0xf); + y = ((int)(s8)buf[3] << 4) | (buf[2] & 0xf); + z = ((int)(s8)buf[5] << 4) | (buf[4] & 0xf); input_report_abs(dev->input, ABS_X, x); input_report_abs(dev->input, ABS_Y, y); |