All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: linux-input@vger.kernel.org
Cc: Thierry Reding <thierry.reding@gmail.com>,
	linux-kernel@vger.kernel.org,
	David Lechner <david@lechnology.com>
Subject: [PATCH 3/3] Input: pwm-beeper - use input_set_capability()
Date: Fri,  6 Jan 2017 10:20:50 -0800	[thread overview]
Message-ID: <20170106182050.2772-3-dmitry.torokhov@gmail.com> (raw)
In-Reply-To: <20170106182050.2772-1-dmitry.torokhov@gmail.com>

Instead of manipulating capability bits directly, let's use
input_set_capability() API.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 drivers/input/misc/pwm-beeper.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/input/misc/pwm-beeper.c b/drivers/input/misc/pwm-beeper.c
index 14c52054f5b7..90e8eea8607d 100644
--- a/drivers/input/misc/pwm-beeper.c
+++ b/drivers/input/misc/pwm-beeper.c
@@ -131,8 +131,8 @@ static int pwm_beeper_probe(struct platform_device *pdev)
 	beeper->input->id.product = 0x0001;
 	beeper->input->id.version = 0x0100;
 
-	beeper->input->evbit[0] = BIT(EV_SND);
-	beeper->input->sndbit[0] = BIT(SND_TONE) | BIT(SND_BELL);
+	inptut_set_capability(beeper->input, EV_SND, SND_TONE);
+	inptut_set_capability(beeper->input, EV_SND, SND_BELL);
 
 	beeper->input->event = pwm_beeper_event;
 	beeper->input->close = pwm_beeper_close;
-- 
2.11.0.390.gc69c2f50cf-goog


  parent reply	other threads:[~2017-01-06 18:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-06 18:20 [PATCH 1/3] Input: pwm-beeper - remove calls to legacy pwm_request API Dmitry Torokhov
2017-01-06 18:20 ` [PATCH 2/3] Input: pwm-beeper - switch to using managed resources Dmitry Torokhov
2017-01-07  4:01   ` David Lechner
2017-01-06 18:20 ` Dmitry Torokhov [this message]
2017-01-06 18:29   ` [PATCH 3/3 v2] Input: pwm-beeper - use input_set_capability() 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=20170106182050.2772-3-dmitry.torokhov@gmail.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=david@lechnology.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thierry.reding@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.