aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2013-05-27 08:44:43 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-05-28 21:50:44 -0400
commit849513a7809175420d353625b6f651d961e99d49 (patch)
tree800a97a7c609aaeed8fc468203fe688b23509c5c
parent6c13ff68a7ce01da7a51b44241a7aad8eaaedde7 (diff)
USB: mos7720: fix message timeouts
The control and bulk-message timeouts are specified in milliseconds and should not depend on HZ. Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/serial/mos7720.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c
index 7752cffbf2bc..6eac26649009 100644
--- a/drivers/usb/serial/mos7720.c
+++ b/drivers/usb/serial/mos7720.c
@@ -40,7 +40,7 @@
40#define DRIVER_DESC "Moschip USB Serial Driver" 40#define DRIVER_DESC "Moschip USB Serial Driver"
41 41
42/* default urb timeout */ 42/* default urb timeout */
43#define MOS_WDR_TIMEOUT (HZ * 5) 43#define MOS_WDR_TIMEOUT 5000
44 44
45#define MOS_MAX_PORT 0x02 45#define MOS_MAX_PORT 0x02
46#define MOS_WRITE 0x0E 46#define MOS_WRITE 0x0E
@@ -1938,7 +1938,7 @@ static int mos7720_startup(struct usb_serial *serial)
1938 1938
1939 /* setting configuration feature to one */ 1939 /* setting configuration feature to one */
1940 usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), 1940 usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
1941 (__u8)0x03, 0x00, 0x01, 0x00, NULL, 0x00, 5*HZ); 1941 (__u8)0x03, 0x00, 0x01, 0x00, NULL, 0x00, 5000);
1942 1942
1943 /* start the interrupt urb */ 1943 /* start the interrupt urb */
1944 ret_val = usb_submit_urb(serial->port[0]->interrupt_in_urb, GFP_KERNEL); 1944 ret_val = usb_submit_urb(serial->port[0]->interrupt_in_urb, GFP_KERNEL);
@@ -1981,7 +1981,7 @@ static void mos7720_release(struct usb_serial *serial)
1981 /* wait for synchronous usb calls to return */ 1981 /* wait for synchronous usb calls to return */
1982 if (mos_parport->msg_pending) 1982 if (mos_parport->msg_pending)
1983 wait_for_completion_timeout(&mos_parport->syncmsg_compl, 1983 wait_for_completion_timeout(&mos_parport->syncmsg_compl,
1984 MOS_WDR_TIMEOUT); 1984 msecs_to_jiffies(MOS_WDR_TIMEOUT));
1985 1985
1986 parport_remove_port(mos_parport->pp); 1986 parport_remove_port(mos_parport->pp);
1987 usb_set_serial_data(serial, NULL); 1987 usb_set_serial_data(serial, NULL);