From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Marcus Folkesson <marcus.folkesson@gmail.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] input: as5011: avoid using __set_bit() for capabilities
Date: Tue, 8 May 2018 15:32:34 -0700 [thread overview]
Message-ID: <20180508223234.GB129015@dtor-ws> (raw)
In-Reply-To: <20180331112143.18768-2-marcus.folkesson@gmail.com>
On Sat, Mar 31, 2018 at 01:21:41PM +0200, Marcus Folkesson wrote:
> input_set_capability() and input_set_abs_param() will do it for you.
>
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Applied, thank you.
> ---
> drivers/input/joystick/as5011.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/input/joystick/as5011.c b/drivers/input/joystick/as5011.c
> index 005d852a06e9..f051993c568e 100644
> --- a/drivers/input/joystick/as5011.c
> +++ b/drivers/input/joystick/as5011.c
> @@ -269,9 +269,7 @@ static int as5011_probe(struct i2c_client *client,
> input_dev->id.bustype = BUS_I2C;
> input_dev->dev.parent = &client->dev;
>
> - __set_bit(EV_KEY, input_dev->evbit);
> - __set_bit(EV_ABS, input_dev->evbit);
> - __set_bit(BTN_JOYSTICK, input_dev->keybit);
> + input_set_capability(input_dev, EV_KEY, BTN_JOYSTICK);
>
> input_set_abs_params(input_dev, ABS_X,
> AS5011_MIN_AXIS, AS5011_MAX_AXIS, AS5011_FUZZ, AS5011_FLAT);
> --
> 2.16.2
>
--
Dmitry
next prev parent reply other threads:[~2018-05-08 22:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-31 11:21 [PATCH 1/3] input: xpad: avoid using __set_bit() for capabilities Marcus Folkesson
2018-03-31 11:21 ` [PATCH 2/3] input: as5011: " Marcus Folkesson
2018-05-08 22:32 ` Dmitry Torokhov [this message]
2018-03-31 11:21 ` [PATCH 3/3] input: gamecon: " Marcus Folkesson
2018-05-08 22:32 ` Dmitry Torokhov
2018-05-08 22:32 ` [PATCH 1/3] input: xpad: " Dmitry Torokhov
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=20180508223234.GB129015@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcus.folkesson@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).