aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/joystick/iforce/iforce-packets.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/joystick/iforce/iforce-packets.c')
-rw-r--r--drivers/input/joystick/iforce/iforce-packets.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/input/joystick/iforce/iforce-packets.c b/drivers/input/joystick/iforce/iforce-packets.c
index 21c4e13d3a50..3154ccd74000 100644
--- a/drivers/input/joystick/iforce/iforce-packets.c
+++ b/drivers/input/joystick/iforce/iforce-packets.c
@@ -246,6 +246,8 @@ void iforce_process_packet(struct iforce *iforce, u16 cmd, unsigned char *data)
246 246
247int iforce_get_id_packet(struct iforce *iforce, char *packet) 247int iforce_get_id_packet(struct iforce *iforce, char *packet)
248{ 248{
249 int status;
250
249 switch (iforce->bus) { 251 switch (iforce->bus) {
250 252
251 case IFORCE_USB: 253 case IFORCE_USB:
@@ -254,18 +256,22 @@ int iforce_get_id_packet(struct iforce *iforce, char *packet)
254 iforce->cr.bRequest = packet[0]; 256 iforce->cr.bRequest = packet[0];
255 iforce->ctrl->dev = iforce->usbdev; 257 iforce->ctrl->dev = iforce->usbdev;
256 258
257 if (usb_submit_urb(iforce->ctrl, GFP_ATOMIC)) 259 status = usb_submit_urb(iforce->ctrl, GFP_ATOMIC);
260 if (status) {
261 err("usb_submit_urb failed %d", status);
258 return -1; 262 return -1;
263 }
259 264
260 wait_event_interruptible_timeout(iforce->wait, 265 wait_event_interruptible_timeout(iforce->wait,
261 iforce->ctrl->status != -EINPROGRESS, HZ); 266 iforce->ctrl->status != -EINPROGRESS, HZ);
262 267
263 if (iforce->ctrl->status) { 268 if (iforce->ctrl->status) {
269 dbg("iforce->ctrl->status = %d", iforce->ctrl->status);
264 usb_unlink_urb(iforce->ctrl); 270 usb_unlink_urb(iforce->ctrl);
265 return -1; 271 return -1;
266 } 272 }
267#else 273#else
268 err("iforce_get_id_packet: iforce->bus = USB!"); 274 dbg("iforce_get_id_packet: iforce->bus = USB!");
269#endif 275#endif
270 break; 276 break;
271 277