Skip to content

Commit ccd6613

Browse files
committed
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/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 9271cda commit ccd6613

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/input/touchscreen/ads7846.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,8 +1307,7 @@ static int ads7846_probe(struct spi_device *spi)
13071307
input_dev->id.bustype = BUS_SPI;
13081308
input_dev->id.product = pdata->model;
13091309

1310-
input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
1311-
input_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH);
1310+
input_set_capability(input_dev, EV_KEY, BTN_TOUCH);
13121311
input_set_abs_params(input_dev, ABS_X,
13131312
pdata->x_min ? : 0,
13141313
pdata->x_max ? : MAX_12BIT,

0 commit comments

Comments
 (0)