aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/input/joystick/iforce/iforce-main.c4
-rw-r--r--drivers/input/joystick/iforce/iforce-packets.c10
2 files changed, 9 insertions, 5 deletions
diff --git a/drivers/input/joystick/iforce/iforce-main.c b/drivers/input/joystick/iforce/iforce-main.c
index fb129c479a66..682244b1c042 100644
--- a/drivers/input/joystick/iforce/iforce-main.c
+++ b/drivers/input/joystick/iforce/iforce-main.c
@@ -370,10 +370,8 @@ int iforce_init_device(struct iforce *iforce)
370 370
371/* 371/*
372 * Disable spring, enable force feedback. 372 * Disable spring, enable force feedback.
373 * FIXME: We should use iforce_set_autocenter() et al here.
374 */ 373 */
375 374 iforce_set_autocenter(input_dev, 0);
376 iforce_send_packet(iforce, FF_CMD_AUTOCENTER, "\004\000");
377 375
378/* 376/*
379 * Find appropriate device entry 377 * Find appropriate device entry
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