Commit 8a038b83 authored by Martin Kepplinger's avatar Martin Kepplinger Committed by Dmitry Torokhov

Input: ar1021_i2c - use BIT to check for a bit

The MSB for the first byte of touch data transmission is always 1. Make
it a little more obvious we're testing this bit by using BIT(7).
Signed-off-by: default avatarMartin Kepplinger <martink@posteo.de>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 61e29ec1
......@@ -6,6 +6,7 @@
* License: GPLv2 as published by the FSF.
*/
#include <linux/bitops.h>
#include <linux/module.h>
#include <linux/input.h>
#include <linux/of.h>
......@@ -42,7 +43,7 @@ static irqreturn_t ar1021_i2c_irq(int irq, void *dev_id)
goto out;
/* sync bit set ? */
if ((data[0] & 0x80) == 0)
if (!(data[0] & BIT(7)))
goto out;
button = data[0] & BIT(0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment