diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-10-08 09:28:32 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-10-08 11:06:12 -0700 |
commit | 2c9a9cfec04f2c6ed7b4e607cd53ca903b2c4642 (patch) | |
tree | 9f906f2a833e5ce6a5799786e054c3c4d2b0f4e4 /drivers/input | |
parent | b3f9db49c1d383256f95c53c850e90bc2f4e05e4 (diff) | |
download | linux-2c9a9cfec04f2c6ed7b4e607cd53ca903b2c4642.tar.bz2 |
Input: automatically set EV_ABS bit in input_set_abs_params
Let's automatically set EV_ABS bit in device's event type list when calling
input_set_abs_params() so that drivers do not have to do it explicitly.
These calls are never in a hot paths so we won't lose much time by setting
the same bit several times.
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/input.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c index 29ca0bb4f561..d2e06cc7e179 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -498,7 +498,8 @@ void input_set_abs_params(struct input_dev *dev, unsigned int axis, absinfo->fuzz = fuzz; absinfo->flat = flat; - dev->absbit[BIT_WORD(axis)] |= BIT_MASK(axis); + __set_bit(EV_ABS, dev->evbit); + __set_bit(axis, dev->absbit); } EXPORT_SYMBOL(input_set_abs_params); |