Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1553023
| From | Dmitry Torokhov <dmitry.torokhov@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3/3 v2] Input: pwm-beeper - use input_set_capability() |
| Date | 2017-01-06 19:30 +0100 |
| Message-ID | <sWHr5-5KI-39@gated-at.bofh.it> (permalink) |
| References | <sWHr4-5KI-3@gated-at.bofh.it> <sWHr4-5KI-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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..ce6eec48ec5f 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); + input_set_capability(beeper->input, EV_SND, SND_TONE); + input_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
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 1/3] Input: pwm-beeper - remove calls to legacy pwm_request API Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-06 19:30 +0100
[PATCH 3/3] Input: pwm-beeper - use input_set_capability() Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-06 19:30 +0100
[PATCH 3/3 v2] Input: pwm-beeper - use input_set_capability() Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-06 19:30 +0100
csiph-web