diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-04-15 10:31:10 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-05-20 14:49:36 -0700 |
commit | c37f6d3879634ca44ef93659690bb1732bbfaab9 (patch) | |
tree | d885b23e0f8858116b4234064f137367acd5405f /drivers/input/touchscreen | |
parent | dccf1dd8458236a28552510b83a06a8cc0f1c473 (diff) |
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')
-rw-r--r-- | drivers/input/touchscreen/atmel_mxt_ts.c | 8 |
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))); } } |