projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f1919cb
)
mtd: st_spi_fsm: Allow loop to run at least once before giving up CPU
author
Lee Jones
<lee.jones@linaro.org>
Thu, 20 Mar 2014 11:11:46 +0000
(11:11 +0000)
committer
Brian Norris
<computersforpeace@gmail.com>
Thu, 20 Mar 2014 11:56:52 +0000
(
04:56
-0700)
Reported-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/devices/st_spi_fsm.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/devices/st_spi_fsm.c
b/drivers/mtd/devices/st_spi_fsm.c
index
ef9f9b8
..
4d6b58c
100644
(file)
--- 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");