From: Jiri Kosina <jkosina@suse.cz>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org, Henrik Rydberg <rydberg@euromail.se>,
Hans de Goede <hdegoede@redhat.com>,
David Herrmann <dh.herrmann@gmail.com>,
Benjamin Tissoires <benjamin.tissoires@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Input: automatically set EV_ABS bit in input_set_abs_params
Date: Fri, 10 Oct 2014 13:30:28 +0200 (CEST) [thread overview]
Message-ID: <alpine.LNX.2.00.1410101330030.31343@pobox.suse.cz> (raw)
In-Reply-To: <20141008165425.GA23281@dtor-ws>
On Wed, 8 Oct 2014, Dmitry Torokhov wrote:
> 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.
>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Makes sense.
Acked-by: Jiri Kosina <jkosina@suse.cz>
Thanks.
> ---
> drivers/input/input.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/input/input.c b/drivers/input/input.c
> index 29ca0bb..d2e06cc 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);
--
Jiri Kosina
SUSE Labs
prev parent reply other threads:[~2014-10-10 11:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-08 16:54 [PATCH] Input: automatically set EV_ABS bit in input_set_abs_params Dmitry Torokhov
2014-10-08 17:09 ` David Herrmann
2014-10-10 11:30 ` Jiri Kosina [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LNX.2.00.1410101330030.31343@pobox.suse.cz \
--to=jkosina@suse.cz \
--cc=benjamin.tissoires@gmail.com \
--cc=dh.herrmann@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=hdegoede@redhat.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rydberg@euromail.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox