diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2015-04-08 23:26:21 +0200 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2015-04-08 23:26:21 +0200 |
| commit | 462b69b1e43ceccab68a47d65b1e46520cd0fdc0 (patch) | |
| tree | 3c961fcb5889c5ab14ab36d8ef7421fc96c95959 /drivers/usb/serial/generic.c | |
| parent | d8bf368d0631d4bc2612d8bf2e4e8e74e620d0cc (diff) | |
| parent | f22e6e847115abc3a0e2ad7bb18d243d42275af1 (diff) | |
Merge branch 'linus' into irq/core to get the GIC updates which
conflict with pending GIC changes.
Conflicts:
drivers/usb/isp1760/isp1760-core.c
Diffstat (limited to 'drivers/usb/serial/generic.c')
| -rw-r--r-- | drivers/usb/serial/generic.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index ccf1df7c4b80..54e170dd3dad 100644 --- a/drivers/usb/serial/generic.c +++ b/drivers/usb/serial/generic.c @@ -258,7 +258,8 @@ void usb_serial_generic_wait_until_sent(struct tty_struct *tty, long timeout) * character or at least one jiffy. */ period = max_t(unsigned long, (10 * HZ / bps), 1); - period = min_t(unsigned long, period, timeout); + if (timeout) + period = min_t(unsigned long, period, timeout); dev_dbg(&port->dev, "%s - timeout = %u ms, period = %u ms\n", __func__, jiffies_to_msecs(timeout), @@ -268,7 +269,7 @@ void usb_serial_generic_wait_until_sent(struct tty_struct *tty, long timeout) schedule_timeout_interruptible(period); if (signal_pending(current)) break; - if (time_after(jiffies, expire)) + if (timeout && time_after(jiffies, expire)) break; } } |
