Commit c0338c15 authored by Johann Deneux's avatar Johann Deneux Committed by Dmitry Torokhov

Input: iforce - minor clean-ups

Signed-off-by: default avatarJohann Deneux <johann.deneux@gmail.com>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent b8691fd2
...@@ -370,10 +370,8 @@ int iforce_init_device(struct iforce *iforce) ...@@ -370,10 +370,8 @@ int iforce_init_device(struct iforce *iforce)
/* /*
* Disable spring, enable force feedback. * Disable spring, enable force feedback.
* FIXME: We should use iforce_set_autocenter() et al here.
*/ */
iforce_set_autocenter(input_dev, 0);
iforce_send_packet(iforce, FF_CMD_AUTOCENTER, "\004\000");
/* /*
* Find appropriate device entry * Find appropriate device entry
......
...@@ -246,6 +246,8 @@ void iforce_process_packet(struct iforce *iforce, u16 cmd, unsigned char *data) ...@@ -246,6 +246,8 @@ void iforce_process_packet(struct iforce *iforce, u16 cmd, unsigned char *data)
int iforce_get_id_packet(struct iforce *iforce, char *packet) int iforce_get_id_packet(struct iforce *iforce, char *packet)
{ {
int status;
switch (iforce->bus) { switch (iforce->bus) {
case IFORCE_USB: case IFORCE_USB:
...@@ -254,18 +256,22 @@ int iforce_get_id_packet(struct iforce *iforce, char *packet) ...@@ -254,18 +256,22 @@ int iforce_get_id_packet(struct iforce *iforce, char *packet)
iforce->cr.bRequest = packet[0]; iforce->cr.bRequest = packet[0];
iforce->ctrl->dev = iforce->usbdev; iforce->ctrl->dev = iforce->usbdev;
if (usb_submit_urb(iforce->ctrl, GFP_ATOMIC)) status = usb_submit_urb(iforce->ctrl, GFP_ATOMIC);
if (status) {
err("usb_submit_urb failed %d", status);
return -1; return -1;
}
wait_event_interruptible_timeout(iforce->wait, wait_event_interruptible_timeout(iforce->wait,
iforce->ctrl->status != -EINPROGRESS, HZ); iforce->ctrl->status != -EINPROGRESS, HZ);
if (iforce->ctrl->status) { if (iforce->ctrl->status) {
dbg("iforce->ctrl->status = %d", iforce->ctrl->status);
usb_unlink_urb(iforce->ctrl); usb_unlink_urb(iforce->ctrl);
return -1; return -1;
} }
#else #else
err("iforce_get_id_packet: iforce->bus = USB!"); dbg("iforce_get_id_packet: iforce->bus = USB!");
#endif #endif
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment