projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dccf1dd
)
Input: atmel_mxt_ts - use BIT() macro when reporting button state
author
Dmitry Torokhov
<
[email protected]
>
Wed, 15 Apr 2015 17:31:10 +0000
(10:31 -0700)
committer
Dmitry Torokhov
<
[email protected]
>
Wed, 20 May 2015 21:49:36 +0000
(14:49 -0700)
This makes the intent a tad more clear.
Reviewed-by: Javier Martinez Canillas <
[email protected]
>
Signed-off-by: Dmitry Torokhov <
[email protected]
>
drivers/input/touchscreen/atmel_mxt_ts.c
patch
|
blob
|
history
diff --git
a/drivers/input/touchscreen/atmel_mxt_ts.c
b/drivers/input/touchscreen/atmel_mxt_ts.c
index 40b98dda8f38be802c7896e4652bb7591c57c88c..dfc7309e3d3898b88e5fa5add0451490a08f1a8c 100644
(file)
--- 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)));
}
}