Thread (6 messages) 6 messages, 2 authors, 2018-05-08

Re: [PATCH 1/3] input: xpad: avoid using __set_bit() for capabilities

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2018-05-08 22:32:28
Also in: lkml

On Sat, Mar 31, 2018 at 01:21:40PM +0200, Marcus Folkesson wrote:
quoted hunk ↗ jump to hunk
input_set_capability() and input_set_abs_param() will do it for you.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
 drivers/input/joystick/xpad.c | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index 9d2688f3f961..cbf54082281d 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -1568,7 +1568,6 @@ static void xpad_close(struct input_dev *dev)
 static void xpad_set_up_abs(struct input_dev *input_dev, signed short abs)
 {
 	struct usb_xpad *xpad = input_get_drvdata(input_dev);
-	set_bit(abs, input_dev->absbit);
The switch below does not cover all possible values of ABS_*, so I stuck
"default" branch there in case we'll ever have ABS_* that is not covered
explicitly.

Applied, thank you.
quoted hunk ↗ jump to hunk
 
 	switch (abs) {
 	case ABS_X:
@@ -1628,10 +1627,7 @@ static int xpad_init_input(struct usb_xpad *xpad)
Thanks.

-- 
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help