Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1632833 > unrolled thread
| Started by | Sebastian Reichel <sebastian.reichel@collabora.co.uk> |
|---|---|
| First post | 2017-04-28 14:30 +0200 |
| Last post | 2017-04-28 19:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 2/2] Input: twl4030-pwrbutton: Use input_set_capability() helper Sebastian Reichel <sebastian.reichel@collabora.co.uk> - 2017-04-28 14:30 +0200
Re: [PATCH 2/2] Input: twl4030-pwrbutton: Use input_set_capability() helper Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-04-28 19:30 +0200
| From | Sebastian Reichel <sebastian.reichel@collabora.co.uk> |
|---|---|
| Date | 2017-04-28 14:30 +0200 |
| Subject | [PATCH 2/2] Input: twl4030-pwrbutton: Use input_set_capability() helper |
| Message-ID | <tBdc6-7bX-13@gated-at.bofh.it> |
Cleanup driver slightly by using input_set_capability() instead of manually setting the required bits. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> --- drivers/input/misc/twl4030-pwrbutton.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/input/misc/twl4030-pwrbutton.c b/drivers/input/misc/twl4030-pwrbutton.c index 7c4504c31b07..1c13005b228f 100644 --- a/drivers/input/misc/twl4030-pwrbutton.c +++ b/drivers/input/misc/twl4030-pwrbutton.c @@ -64,8 +64,7 @@ static int twl4030_pwrbutton_probe(struct platform_device *pdev) return -ENOMEM; } - pwr->evbit[0] = BIT_MASK(EV_KEY); - pwr->keybit[BIT_WORD(KEY_POWER)] = BIT_MASK(KEY_POWER); + input_set_capability(pwr, EV_KEY, KEY_POWER); pwr->name = "twl4030_pwrbutton"; pwr->phys = "twl4030_pwrbutton/input0"; pwr->dev.parent = &pdev->dev; -- 2.11.0
[toc] | [next] | [standalone]
| From | Dmitry Torokhov <dmitry.torokhov@gmail.com> |
|---|---|
| Date | 2017-04-28 19:30 +0200 |
| Subject | Re: [PATCH 2/2] Input: twl4030-pwrbutton: Use input_set_capability() helper |
| Message-ID | <tBhSp-272-9@gated-at.bofh.it> |
| In reply to | #1632833 |
On Fri, Apr 28, 2017 at 02:28:55PM +0200, Sebastian Reichel wrote: > Cleanup driver slightly by using input_set_capability() instead > of manually setting the required bits. > > Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Applied, thank you. > --- > drivers/input/misc/twl4030-pwrbutton.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/input/misc/twl4030-pwrbutton.c b/drivers/input/misc/twl4030-pwrbutton.c > index 7c4504c31b07..1c13005b228f 100644 > --- a/drivers/input/misc/twl4030-pwrbutton.c > +++ b/drivers/input/misc/twl4030-pwrbutton.c > @@ -64,8 +64,7 @@ static int twl4030_pwrbutton_probe(struct platform_device *pdev) > return -ENOMEM; > } > > - pwr->evbit[0] = BIT_MASK(EV_KEY); > - pwr->keybit[BIT_WORD(KEY_POWER)] = BIT_MASK(KEY_POWER); > + input_set_capability(pwr, EV_KEY, KEY_POWER); > pwr->name = "twl4030_pwrbutton"; > pwr->phys = "twl4030_pwrbutton/input0"; > pwr->dev.parent = &pdev->dev; > -- > 2.11.0 > -- Dmitry
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web