summaryrefslogtreecommitdiff
path: root/drivers/input/joystick
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2017-09-15 09:52:21 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2017-09-15 09:52:21 -0700
commitbbc8608755da42e7494c00dce24a636007972def (patch)
tree7db003ee57a435042dedfa6664aef31c24922c04 /drivers/input/joystick
parenta6cbfa1e6d38c4b3ab0ce7e3aea4bb4e744f24b8 (diff)
parent697c5d8a36768b36729533fb44622b35d56d6ad0 (diff)
Merge branch 'next' into for-linus
Prepare second round of input updates for 4.14 merge window.
Diffstat (limited to 'drivers/input/joystick')
-rw-r--r--drivers/input/joystick/adi.c2
-rw-r--r--drivers/input/joystick/xpad.c10
2 files changed, 7 insertions, 5 deletions
diff --git a/drivers/input/joystick/adi.c b/drivers/input/joystick/adi.c
index d09cefa37931..15a71acb6997 100644
--- a/drivers/input/joystick/adi.c
+++ b/drivers/input/joystick/adi.c
@@ -313,7 +313,7 @@ static void adi_close(struct input_dev *dev)
static void adi_init_digital(struct gameport *gameport)
{
- int seq[] = { 4, -2, -3, 10, -6, -11, -7, -9, 11, 0 };
+ static const int seq[] = { 4, -2, -3, 10, -6, -11, -7, -9, 11, 0 };
int i;
for (i = 0; seq[i]; i++) {
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index f8e34ef643c7..d86e59515b9c 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -1764,10 +1764,12 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id
struct usb_endpoint_descriptor *ep =
&intf->cur_altsetting->endpoint[i].desc;
- if (usb_endpoint_dir_in(ep))
- ep_irq_in = ep;
- else
- ep_irq_out = ep;
+ if (usb_endpoint_xfer_int(ep)) {
+ if (usb_endpoint_dir_in(ep))
+ ep_irq_in = ep;
+ else
+ ep_irq_out = ep;
+ }
}
if (!ep_irq_in || !ep_irq_out) {