aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/atm/speedtch.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/atm/speedtch.c')
-rw-r--r--drivers/usb/atm/speedtch.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/atm/speedtch.c b/drivers/usb/atm/speedtch.c
index 992db1c16838..03a0e99a4267 100644
--- a/drivers/usb/atm/speedtch.c
+++ b/drivers/usb/atm/speedtch.c
@@ -430,13 +430,11 @@ static void speedtch_check_status(struct speedtch_instance_data *instance)
430 ret = speedtch_read_status(instance); 430 ret = speedtch_read_status(instance);
431 if (ret < 0) { 431 if (ret < 0) {
432 atm_warn(usbatm, "error %d fetching device status\n", ret); 432 atm_warn(usbatm, "error %d fetching device status\n", ret);
433 if (instance->poll_delay < MAX_POLL_DELAY) 433 instance->poll_delay = min(2 * instance->poll_delay, MAX_POLL_DELAY);
434 instance->poll_delay *= 2;
435 return; 434 return;
436 } 435 }
437 436
438 if (instance->poll_delay > MIN_POLL_DELAY) 437 instance->poll_delay = max(instance->poll_delay / 2, MIN_POLL_DELAY);
439 instance->poll_delay /= 2;
440 438
441 atm_dbg(usbatm, "%s: line state %02x\n", __func__, buf[OFFSET_7]); 439 atm_dbg(usbatm, "%s: line state %02x\n", __func__, buf[OFFSET_7]);
442 440