summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices/st_spi_fsm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/devices/st_spi_fsm.c')
-rw-r--r--drivers/mtd/devices/st_spi_fsm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/devices/st_spi_fsm.c b/drivers/mtd/devices/st_spi_fsm.c
index ef9f9b84dbf..4d6b58c976c 100644
--- a/drivers/mtd/devices/st_spi_fsm.c
+++ b/drivers/mtd/devices/st_spi_fsm.c
@@ -861,8 +861,6 @@ static uint8_t stfsm_wait_busy(struct stfsm *fsm)
*/
deadline = jiffies + FLASH_MAX_BUSY_WAIT;
while (!timeout) {
- cond_resched();
-
if (time_after_eq(jiffies, deadline))
timeout = 1;
@@ -881,6 +879,8 @@ static uint8_t stfsm_wait_busy(struct stfsm *fsm)
if (!timeout)
/* Restart */
writel(seq->seq_cfg, fsm->base + SPI_FAST_SEQ_CFG);
+
+ cond_resched();
}
dev_err(fsm->dev, "timeout on wait_busy\n");