diff options
author | Pavel Roskin <proski@gnu.org> | 2007-06-02 14:00:44 -0400 |
---|---|---|
committer | Guido Guenther <agx@bogon.sigxcpu.org> | 2007-06-03 18:38:23 +0200 |
commit | 6aa3b2403fbeba2309571b2bff5221ef9c179fe1 (patch) | |
tree | 31f133a690472be5671f4ce61205634a754bec62 | |
parent | a7cece2a1234b874bd37c380fe39036cd5be4e70 (diff) |
[PATCH] Use schedule_timeout_interruptible()
It's more readable than using two statements.
Signed-off-by: Pavel Roskin <proski@gnu.org>
-rw-r--r-- | at76_usb.c | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -376,8 +376,7 @@ static int at76_usbdfu_download(struct usb_device *udev, u8 *dfu_buffer, need_dfu_state = 1; at76_dbg(DBG_DFU, "DFU: Resetting device"); - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(msecs_to_jiffies(dfu_timeout)); + schedule_timeout_interruptible(msecs_to_jiffies(dfu_timeout)); break; case STATE_DFU_DOWNLOAD_IDLE: @@ -421,8 +420,7 @@ static int at76_usbdfu_download(struct usb_device *udev, u8 *dfu_buffer, dfu_timeout = manifest_sync_timeout; at76_dbg(DBG_DFU, "DFU: Waiting for manifest phase"); - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(msecs_to_jiffies(dfu_timeout)); + schedule_timeout_interruptible(msecs_to_jiffies(dfu_timeout)); } break; @@ -870,8 +868,7 @@ static int at76_wait_completion(struct at76_priv *priv, int cmd) if (status == CMD_STATUS_IN_PROGRESS || status == CMD_STATUS_IDLE) { - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(HZ / 10); /* 100 ms */ + schedule_timeout_interruptible(HZ / 10); /* 100 ms */ } else break; } while (1); @@ -4284,8 +4281,7 @@ static int at76_load_external_fw(struct at76_priv *priv) if (priv->board_type == BOARDTYPE_505A_RFMD_2958) { info("200 ms delay for board type 7"); /* can we do this with priv->mtx down? */ - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(HZ / 5 + 1); + schedule_timeout_interruptible(HZ / 5 + 1); } } priv->istate = INIT; |