diff options
| -rw-r--r-- | drivers/usb/serial/mos7840.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c index 009c1d99e146..2f6da1e89bfa 100644 --- a/drivers/usb/serial/mos7840.c +++ b/drivers/usb/serial/mos7840.c | |||
| @@ -82,8 +82,7 @@ | |||
| 82 | * Defines used for sending commands to port | 82 | * Defines used for sending commands to port |
| 83 | */ | 83 | */ |
| 84 | 84 | ||
| 85 | #define WAIT_FOR_EVER (HZ * 0) /* timeout urb is wait for ever */ | 85 | #define MOS_WDR_TIMEOUT 5000 /* default urb timeout */ |
| 86 | #define MOS_WDR_TIMEOUT (HZ * 5) /* default urb timeout */ | ||
| 87 | 86 | ||
| 88 | #define MOS_PORT1 0x0200 | 87 | #define MOS_PORT1 0x0200 |
| 89 | #define MOS_PORT2 0x0300 | 88 | #define MOS_PORT2 0x0300 |
| @@ -1347,7 +1346,7 @@ static void mos7840_close(struct usb_serial_port *port) | |||
| 1347 | static void mos7840_block_until_chase_response(struct tty_struct *tty, | 1346 | static void mos7840_block_until_chase_response(struct tty_struct *tty, |
| 1348 | struct moschip_port *mos7840_port) | 1347 | struct moschip_port *mos7840_port) |
| 1349 | { | 1348 | { |
| 1350 | int timeout = 1 * HZ; | 1349 | int timeout = msecs_to_jiffies(1000); |
| 1351 | int wait = 10; | 1350 | int wait = 10; |
| 1352 | int count; | 1351 | int count; |
| 1353 | 1352 | ||
| @@ -2675,7 +2674,7 @@ static int mos7840_startup(struct usb_serial *serial) | |||
| 2675 | 2674 | ||
| 2676 | /* setting configuration feature to one */ | 2675 | /* setting configuration feature to one */ |
| 2677 | usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), | 2676 | usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), |
| 2678 | (__u8) 0x03, 0x00, 0x01, 0x00, NULL, 0x00, 5 * HZ); | 2677 | (__u8) 0x03, 0x00, 0x01, 0x00, NULL, 0x00, MOS_WDR_TIMEOUT); |
| 2679 | return 0; | 2678 | return 0; |
| 2680 | error: | 2679 | error: |
| 2681 | for (/* nothing */; i >= 0; i--) { | 2680 | for (/* nothing */; i >= 0; i--) { |
