From: Dmitry Torokhov Date: Wed, 15 Apr 2015 17:31:10 +0000 (-0700) Subject: Input: atmel_mxt_ts - use BIT() macro when reporting button state X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c37f6d3879634ca44ef93659690bb1732bbfaab9;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Input: atmel_mxt_ts - use BIT() macro when reporting button state This makes the intent a tad more clear. Reviewed-by: Javier Martinez Canillas Signed-off-by: Dmitry Torokhov --- 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))); } }