[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210910045039.4020199-2-dmitry.torokhov@gmail.com>
Date: Thu, 9 Sep 2021 21:50:38 -0700
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Daniel Mack <daniel@...que.org>,
Marco Felsch <m.felsch@...gutronix.de>
Cc: linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 2/3] Input: ads7846 - use input_set_capability()
Instead of manipulating capability bits directly use
input_set_capability(). Also stop setting EV_ABS explicitly as
input_set_abs_params() does it for us.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@...il.com>
---
drivers/input/touchscreen/ads7846.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index a018481e9d8b..0f973351bc67 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -1307,8 +1307,7 @@ static int ads7846_probe(struct spi_device *spi)
input_dev->id.bustype = BUS_SPI;
input_dev->id.product = pdata->model;
- input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
- input_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH);
+ input_set_capability(input_dev, EV_KEY, BTN_TOUCH);
input_set_abs_params(input_dev, ABS_X,
pdata->x_min ? : 0,
pdata->x_max ? : MAX_12BIT,
--
2.33.0.309.g3052b89438-goog
Powered by blists - more mailing lists