Skip to content

Commit d120568

Browse files
3x380VBoris Brezillon
authored andcommitted
mtd: onenand: omap2: Account waiting time as waiting on IO
Use wait_for_completion_io_timeout, which has an impact on how the task is accounted in scheduling stats. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Acked-by: Roger Quadros <rogerq@ti.com> Tested-by: Tony Lindgren <tony@atomide.com> Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
1 parent fafc0b3 commit d120568

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/mtd/onenand/omap2.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,8 @@ static int omap2_onenand_wait(struct mtd_info *mtd, int state)
170170
if (result == 0) {
171171
int retry_cnt = 0;
172172
retry:
173-
result = wait_for_completion_timeout(&c->irq_done,
174-
msecs_to_jiffies(20));
175-
if (result == 0) {
173+
if (!wait_for_completion_io_timeout(&c->irq_done,
174+
msecs_to_jiffies(20))) {
176175
/* Timeout after 20ms */
177176
ctrl = read_reg(c, ONENAND_REG_CTRL_STATUS);
178177
if (ctrl & ONENAND_CTRL_ONGO &&

0 commit comments

Comments
 (0)