diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-07-25 01:43:04 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-07-25 01:43:04 -0400 |
commit | 314820c9e892d8f41ba4db300ec96770d9c8294b (patch) | |
tree | 3d5c59a429239b180c77e57f998a78d3f2b79827 /drivers/input/joystick | |
parent | e76b8ee25e034ab601b525abb95cea14aa167ed3 (diff) | |
parent | 07b8481d4aff73d6f451f25e74ea10240ff5131e (diff) |
Merge branch 'next' into for-linus
Diffstat (limited to 'drivers/input/joystick')
-rw-r--r-- | drivers/input/joystick/as5011.c | 1 | ||||
-rw-r--r-- | drivers/input/joystick/iforce/iforce-main.c | 3 | ||||
-rw-r--r-- | drivers/input/joystick/iforce/iforce-packets.c | 16 | ||||
-rw-r--r-- | drivers/input/joystick/iforce/iforce-usb.c | 18 | ||||
-rw-r--r-- | drivers/input/joystick/iforce/iforce.h | 1 | ||||
-rw-r--r-- | drivers/input/joystick/xpad.c | 35 |
6 files changed, 50 insertions, 24 deletions
diff --git a/drivers/input/joystick/as5011.c b/drivers/input/joystick/as5011.c index feeefcb09e7..c96653b5886 100644 --- a/drivers/input/joystick/as5011.c +++ b/drivers/input/joystick/as5011.c | |||
@@ -231,6 +231,7 @@ static int __devinit as5011_probe(struct i2c_client *client, | |||
231 | } | 231 | } |
232 | 232 | ||
233 | if (!i2c_check_functionality(client->adapter, | 233 | if (!i2c_check_functionality(client->adapter, |
234 | I2C_FUNC_NOSTART | | ||
234 | I2C_FUNC_PROTOCOL_MANGLING)) { | 235 | I2C_FUNC_PROTOCOL_MANGLING)) { |
235 | dev_err(&client->dev, | 236 | dev_err(&client->dev, |
236 | "need i2c bus that supports protocol mangling\n"); | 237 | "need i2c bus that supports protocol mangling\n"); |
diff --git a/drivers/input/joystick/iforce/iforce-main.c b/drivers/input/joystick/iforce/iforce-main.c index 405febd94f2..daeeb4c7e3b 100644 --- a/drivers/input/joystick/iforce/iforce-main.c +++ b/drivers/input/joystick/iforce/iforce-main.c | |||
@@ -317,7 +317,8 @@ int iforce_init_device(struct iforce *iforce) | |||
317 | break; | 317 | break; |
318 | 318 | ||
319 | if (i == 20) { /* 5 seconds */ | 319 | if (i == 20) { /* 5 seconds */ |
320 | err("Timeout waiting for response from device."); | 320 | dev_err(&input_dev->dev, |
321 | "Timeout waiting for response from device.\n"); | ||
321 | error = -ENODEV; | 322 | error = -ENODEV; |
322 | goto fail; | 323 | goto fail; |
323 | } | 324 | } |
diff --git a/drivers/input/joystick/iforce/iforce-packets.c b/drivers/input/joystick/iforce/iforce-packets.c index a17b5001600..08f98f2eaf8 100644 --- a/drivers/input/joystick/iforce/iforce-packets.c +++ b/drivers/input/joystick/iforce/iforce-packets.c | |||
@@ -257,7 +257,8 @@ int iforce_get_id_packet(struct iforce *iforce, char *packet) | |||
257 | 257 | ||
258 | status = usb_submit_urb(iforce->ctrl, GFP_ATOMIC); | 258 | status = usb_submit_urb(iforce->ctrl, GFP_ATOMIC); |
259 | if (status) { | 259 | if (status) { |
260 | err("usb_submit_urb failed %d", status); | 260 | dev_err(&iforce->intf->dev, |
261 | "usb_submit_urb failed %d\n", status); | ||
261 | return -1; | 262 | return -1; |
262 | } | 263 | } |
263 | 264 | ||
@@ -265,12 +266,14 @@ int iforce_get_id_packet(struct iforce *iforce, char *packet) | |||
265 | iforce->ctrl->status != -EINPROGRESS, HZ); | 266 | iforce->ctrl->status != -EINPROGRESS, HZ); |
266 | 267 | ||
267 | if (iforce->ctrl->status) { | 268 | if (iforce->ctrl->status) { |
268 | dbg("iforce->ctrl->status = %d", iforce->ctrl->status); | 269 | dev_dbg(&iforce->intf->dev, |
270 | "iforce->ctrl->status = %d\n", | ||
271 | iforce->ctrl->status); | ||
269 | usb_unlink_urb(iforce->ctrl); | 272 | usb_unlink_urb(iforce->ctrl); |
270 | return -1; | 273 | return -1; |
271 | } | 274 | } |
272 | #else | 275 | #else |
273 | dbg("iforce_get_id_packet: iforce->bus = USB!"); | 276 | printk(KERN_DEBUG "iforce_get_id_packet: iforce->bus = USB!\n"); |
274 | #endif | 277 | #endif |
275 | } | 278 | } |
276 | break; | 279 | break; |
@@ -289,12 +292,15 @@ int iforce_get_id_packet(struct iforce *iforce, char *packet) | |||
289 | return -1; | 292 | return -1; |
290 | } | 293 | } |
291 | #else | 294 | #else |
292 | err("iforce_get_id_packet: iforce->bus = SERIO!"); | 295 | dev_err(&iforce->dev->dev, |
296 | "iforce_get_id_packet: iforce->bus = SERIO!\n"); | ||
293 | #endif | 297 | #endif |
294 | break; | 298 | break; |
295 | 299 | ||
296 | default: | 300 | default: |
297 | err("iforce_get_id_packet: iforce->bus = %d", iforce->bus); | 301 | dev_err(&iforce->dev->dev, |
302 | "iforce_get_id_packet: iforce->bus = %d\n", | ||
303 | iforce->bus); | ||
298 | break; | 304 | break; |
299 | } | 305 | } |
300 | 306 | ||
diff --git a/drivers/input/joystick/iforce/iforce-usb.c b/drivers/input/joystick/iforce/iforce-usb.c index 6c96631ae5d..d96aa27dfcd 100644 --- a/drivers/input/joystick/iforce/iforce-usb.c +++ b/drivers/input/joystick/iforce/iforce-usb.c | |||
@@ -64,7 +64,7 @@ void iforce_usb_xmit(struct iforce *iforce) | |||
64 | 64 | ||
65 | if ( (n=usb_submit_urb(iforce->out, GFP_ATOMIC)) ) { | 65 | if ( (n=usb_submit_urb(iforce->out, GFP_ATOMIC)) ) { |
66 | clear_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags); | 66 | clear_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags); |
67 | dev_warn(&iforce->dev->dev, "usb_submit_urb failed %d\n", n); | 67 | dev_warn(&iforce->intf->dev, "usb_submit_urb failed %d\n", n); |
68 | } | 68 | } |
69 | 69 | ||
70 | /* The IFORCE_XMIT_RUNNING bit is not cleared here. That's intended. | 70 | /* The IFORCE_XMIT_RUNNING bit is not cleared here. That's intended. |
@@ -76,6 +76,7 @@ void iforce_usb_xmit(struct iforce *iforce) | |||
76 | static void iforce_usb_irq(struct urb *urb) | 76 | static void iforce_usb_irq(struct urb *urb) |
77 | { | 77 | { |
78 | struct iforce *iforce = urb->context; | 78 | struct iforce *iforce = urb->context; |
79 | struct device *dev = &iforce->intf->dev; | ||
79 | int status; | 80 | int status; |
80 | 81 | ||
81 | switch (urb->status) { | 82 | switch (urb->status) { |
@@ -86,11 +87,12 @@ static void iforce_usb_irq(struct urb *urb) | |||
86 | case -ENOENT: | 87 | case -ENOENT: |
87 | case -ESHUTDOWN: | 88 | case -ESHUTDOWN: |
88 | /* this urb is terminated, clean up */ | 89 | /* this urb is terminated, clean up */ |
89 | dbg("%s - urb shutting down with status: %d", | 90 | dev_dbg(dev, "%s - urb shutting down with status: %d\n", |
90 | __func__, urb->status); | 91 | __func__, urb->status); |
91 | return; | 92 | return; |
92 | default: | 93 | default: |
93 | dbg("%s - urb has status of: %d", __func__, urb->status); | 94 | dev_dbg(dev, "%s - urb has status of: %d\n", |
95 | __func__, urb->status); | ||
94 | goto exit; | 96 | goto exit; |
95 | } | 97 | } |
96 | 98 | ||
@@ -100,8 +102,8 @@ static void iforce_usb_irq(struct urb *urb) | |||
100 | exit: | 102 | exit: |
101 | status = usb_submit_urb (urb, GFP_ATOMIC); | 103 | status = usb_submit_urb (urb, GFP_ATOMIC); |
102 | if (status) | 104 | if (status) |
103 | err ("%s - usb_submit_urb failed with result %d", | 105 | dev_err(dev, "%s - usb_submit_urb failed with result %d\n", |
104 | __func__, status); | 106 | __func__, status); |
105 | } | 107 | } |
106 | 108 | ||
107 | static void iforce_usb_out(struct urb *urb) | 109 | static void iforce_usb_out(struct urb *urb) |
@@ -110,7 +112,8 @@ static void iforce_usb_out(struct urb *urb) | |||
110 | 112 | ||
111 | if (urb->status) { | 113 | if (urb->status) { |
112 | clear_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags); | 114 | clear_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags); |
113 | dbg("urb->status %d, exiting", urb->status); | 115 | dev_dbg(&iforce->intf->dev, "urb->status %d, exiting\n", |
116 | urb->status); | ||
114 | return; | 117 | return; |
115 | } | 118 | } |
116 | 119 | ||
@@ -155,6 +158,7 @@ static int iforce_usb_probe(struct usb_interface *intf, | |||
155 | 158 | ||
156 | iforce->bus = IFORCE_USB; | 159 | iforce->bus = IFORCE_USB; |
157 | iforce->usbdev = dev; | 160 | iforce->usbdev = dev; |
161 | iforce->intf = intf; | ||
158 | 162 | ||
159 | iforce->cr.bRequestType = USB_TYPE_VENDOR | USB_DIR_IN | USB_RECIP_INTERFACE; | 163 | iforce->cr.bRequestType = USB_TYPE_VENDOR | USB_DIR_IN | USB_RECIP_INTERFACE; |
160 | iforce->cr.wIndex = 0; | 164 | iforce->cr.wIndex = 0; |
diff --git a/drivers/input/joystick/iforce/iforce.h b/drivers/input/joystick/iforce/iforce.h index 9f494b75848..b1d7d9b0eb8 100644 --- a/drivers/input/joystick/iforce/iforce.h +++ b/drivers/input/joystick/iforce/iforce.h | |||
@@ -115,6 +115,7 @@ struct iforce { | |||
115 | #endif | 115 | #endif |
116 | #ifdef CONFIG_JOYSTICK_IFORCE_USB | 116 | #ifdef CONFIG_JOYSTICK_IFORCE_USB |
117 | struct usb_device *usbdev; /* USB transfer */ | 117 | struct usb_device *usbdev; /* USB transfer */ |
118 | struct usb_interface *intf; | ||
118 | struct urb *irq, *out, *ctrl; | 119 | struct urb *irq, *out, *ctrl; |
119 | struct usb_ctrlrequest cr; | 120 | struct usb_ctrlrequest cr; |
120 | #endif | 121 | #endif |
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index 42f7b257feb..83811e45d63 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c | |||
@@ -256,6 +256,7 @@ MODULE_DEVICE_TABLE (usb, xpad_table); | |||
256 | struct usb_xpad { | 256 | struct usb_xpad { |
257 | struct input_dev *dev; /* input device interface */ | 257 | struct input_dev *dev; /* input device interface */ |
258 | struct usb_device *udev; /* usb device */ | 258 | struct usb_device *udev; /* usb device */ |
259 | struct usb_interface *intf; /* usb interface */ | ||
259 | 260 | ||
260 | int pad_present; | 261 | int pad_present; |
261 | 262 | ||
@@ -461,6 +462,7 @@ static void xpad360w_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned cha | |||
461 | static void xpad_irq_in(struct urb *urb) | 462 | static void xpad_irq_in(struct urb *urb) |
462 | { | 463 | { |
463 | struct usb_xpad *xpad = urb->context; | 464 | struct usb_xpad *xpad = urb->context; |
465 | struct device *dev = &xpad->intf->dev; | ||
464 | int retval, status; | 466 | int retval, status; |
465 | 467 | ||
466 | status = urb->status; | 468 | status = urb->status; |
@@ -473,11 +475,11 @@ static void xpad_irq_in(struct urb *urb) | |||
473 | case -ENOENT: | 475 | case -ENOENT: |
474 | case -ESHUTDOWN: | 476 | case -ESHUTDOWN: |
475 | /* this urb is terminated, clean up */ | 477 | /* this urb is terminated, clean up */ |
476 | dbg("%s - urb shutting down with status: %d", | 478 | dev_dbg(dev, "%s - urb shutting down with status: %d\n", |
477 | __func__, status); | 479 | __func__, status); |
478 | return; | 480 | return; |
479 | default: | 481 | default: |
480 | dbg("%s - nonzero urb status received: %d", | 482 | dev_dbg(dev, "%s - nonzero urb status received: %d\n", |
481 | __func__, status); | 483 | __func__, status); |
482 | goto exit; | 484 | goto exit; |
483 | } | 485 | } |
@@ -496,12 +498,15 @@ static void xpad_irq_in(struct urb *urb) | |||
496 | exit: | 498 | exit: |
497 | retval = usb_submit_urb(urb, GFP_ATOMIC); | 499 | retval = usb_submit_urb(urb, GFP_ATOMIC); |
498 | if (retval) | 500 | if (retval) |
499 | err ("%s - usb_submit_urb failed with result %d", | 501 | dev_err(dev, "%s - usb_submit_urb failed with result %d\n", |
500 | __func__, retval); | 502 | __func__, retval); |
501 | } | 503 | } |
502 | 504 | ||
503 | static void xpad_bulk_out(struct urb *urb) | 505 | static void xpad_bulk_out(struct urb *urb) |
504 | { | 506 | { |
507 | struct usb_xpad *xpad = urb->context; | ||
508 | struct device *dev = &xpad->intf->dev; | ||
509 | |||
505 | switch (urb->status) { | 510 | switch (urb->status) { |
506 | case 0: | 511 | case 0: |
507 | /* success */ | 512 | /* success */ |
@@ -510,16 +515,20 @@ static void xpad_bulk_out(struct urb *urb) | |||
510 | case -ENOENT: | 515 | case -ENOENT: |
511 | case -ESHUTDOWN: | 516 | case -ESHUTDOWN: |
512 | /* this urb is terminated, clean up */ | 517 | /* this urb is terminated, clean up */ |
513 | dbg("%s - urb shutting down with status: %d", __func__, urb->status); | 518 | dev_dbg(dev, "%s - urb shutting down with status: %d\n", |
519 | __func__, urb->status); | ||
514 | break; | 520 | break; |
515 | default: | 521 | default: |
516 | dbg("%s - nonzero urb status received: %d", __func__, urb->status); | 522 | dev_dbg(dev, "%s - nonzero urb status received: %d\n", |
523 | __func__, urb->status); | ||
517 | } | 524 | } |
518 | } | 525 | } |
519 | 526 | ||
520 | #if defined(CONFIG_JOYSTICK_XPAD_FF) || defined(CONFIG_JOYSTICK_XPAD_LEDS) | 527 | #if defined(CONFIG_JOYSTICK_XPAD_FF) || defined(CONFIG_JOYSTICK_XPAD_LEDS) |
521 | static void xpad_irq_out(struct urb *urb) | 528 | static void xpad_irq_out(struct urb *urb) |
522 | { | 529 | { |
530 | struct usb_xpad *xpad = urb->context; | ||
531 | struct device *dev = &xpad->intf->dev; | ||
523 | int retval, status; | 532 | int retval, status; |
524 | 533 | ||
525 | status = urb->status; | 534 | status = urb->status; |
@@ -533,19 +542,21 @@ static void xpad_irq_out(struct urb *urb) | |||
533 | case -ENOENT: | 542 | case -ENOENT: |
534 | case -ESHUTDOWN: | 543 | case -ESHUTDOWN: |
535 | /* this urb is terminated, clean up */ | 544 | /* this urb is terminated, clean up */ |
536 | dbg("%s - urb shutting down with status: %d", __func__, status); | 545 | dev_dbg(dev, "%s - urb shutting down with status: %d\n", |
546 | __func__, status); | ||
537 | return; | 547 | return; |
538 | 548 | ||
539 | default: | 549 | default: |
540 | dbg("%s - nonzero urb status received: %d", __func__, status); | 550 | dev_dbg(dev, "%s - nonzero urb status received: %d\n", |
551 | __func__, status); | ||
541 | goto exit; | 552 | goto exit; |
542 | } | 553 | } |
543 | 554 | ||
544 | exit: | 555 | exit: |
545 | retval = usb_submit_urb(urb, GFP_ATOMIC); | 556 | retval = usb_submit_urb(urb, GFP_ATOMIC); |
546 | if (retval) | 557 | if (retval) |
547 | err("%s - usb_submit_urb failed with result %d", | 558 | dev_err(dev, "%s - usb_submit_urb failed with result %d\n", |
548 | __func__, retval); | 559 | __func__, retval); |
549 | } | 560 | } |
550 | 561 | ||
551 | static int xpad_init_output(struct usb_interface *intf, struct usb_xpad *xpad) | 562 | static int xpad_init_output(struct usb_interface *intf, struct usb_xpad *xpad) |
@@ -658,7 +669,8 @@ static int xpad_play_effect(struct input_dev *dev, void *data, struct ff_effect | |||
658 | return usb_submit_urb(xpad->irq_out, GFP_ATOMIC); | 669 | return usb_submit_urb(xpad->irq_out, GFP_ATOMIC); |
659 | 670 | ||
660 | default: | 671 | default: |
661 | dbg("%s - rumble command sent to unsupported xpad type: %d", | 672 | dev_dbg(&xpad->dev->dev, |
673 | "%s - rumble command sent to unsupported xpad type: %d\n", | ||
662 | __func__, xpad->xtype); | 674 | __func__, xpad->xtype); |
663 | return -1; | 675 | return -1; |
664 | } | 676 | } |
@@ -848,6 +860,7 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id | |||
848 | } | 860 | } |
849 | 861 | ||
850 | xpad->udev = udev; | 862 | xpad->udev = udev; |
863 | xpad->intf = intf; | ||
851 | xpad->mapping = xpad_device[i].mapping; | 864 | xpad->mapping = xpad_device[i].mapping; |
852 | xpad->xtype = xpad_device[i].xtype; | 865 | xpad->xtype = xpad_device[i].xtype; |
853 | 866 | ||