summaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/atmel_mxt_ts.c
diff options
context:
space:
mode:
authorDmitry Torokhov2015-04-15 19:31:10 +0200
committerDmitry Torokhov2015-05-20 23:49:36 +0200
commitc37f6d3879634ca44ef93659690bb1732bbfaab9 (patch)
treed885b23e0f8858116b4234064f137367acd5405f /drivers/input/touchscreen/atmel_mxt_ts.c
parentInput: alps - use the generic process_bitmap function for v5 touchpads (diff)
downloadkernel-qcow2-linux-c37f6d3879634ca44ef93659690bb1732bbfaab9.tar.gz
kernel-qcow2-linux-c37f6d3879634ca44ef93659690bb1732bbfaab9.tar.xz
kernel-qcow2-linux-c37f6d3879634ca44ef93659690bb1732bbfaab9.zip
Input: atmel_mxt_ts - use BIT() macro when reporting button state
This makes the intent a tad more clear. Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/touchscreen/atmel_mxt_ts.c')
-rw-r--r--drivers/input/touchscreen/atmel_mxt_ts.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index 40b98dda8f38..dfc7309e3d38 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -726,15 +726,15 @@ static void mxt_input_button(struct mxt_data *data, u8 *message)
{
struct input_dev *input = data->input_dev;
const struct mxt_platform_data *pdata = data->pdata;
- bool button;
int i;
- /* Active-low switch */
for (i = 0; i < pdata->t19_num_keys; i++) {
if (pdata->t19_keymap[i] == KEY_RESERVED)
continue;
- button = !(message[1] & (1 << i));
- input_report_key(input, pdata->t19_keymap[i], button);
+
+ /* Active-low switch */
+ input_report_key(input, pdata->t19_keymap[i],
+ !(message[1] & BIT(i)));
}
}