summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen/ads7846.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2021-09-10 07:50:38 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2021-10-16 08:09:48 +0300
commitccd661392abb728fc685e543f6be86fc435e163f (patch)
tree7e1a406e1cd8e1f5803c8a48b4f9fbb70ec75134 /drivers/input/touchscreen/ads7846.c
parent9271cda2bb41b16063e2c24aae890e814caf82a1 (diff)
downloadlinux-ccd661392abb728fc685e543f6be86fc435e163f.tar.xz
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. Link: https://lore.kernel.org/r/20210910045039.4020199-2-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/touchscreen/ads7846.c')
-rw-r--r--drivers/input/touchscreen/ads7846.c3
1 files changed, 1 insertions, 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,