Commit d1205688 authored by Ladislav Michl's avatar Ladislav Michl Committed by Boris Brezillon

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: default avatarLadislav Michl <ladis@linux-mips.org>
Reviewed-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: default avatarSebastian Reichel <sebastian.reichel@collabora.co.uk>
Acked-by: default avatarRoger Quadros <rogerq@ti.com>
Tested-by: default avatarTony Lindgren <tony@atomide.com>
Tested-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
parent fafc0b3a
...@@ -170,9 +170,8 @@ static int omap2_onenand_wait(struct mtd_info *mtd, int state) ...@@ -170,9 +170,8 @@ static int omap2_onenand_wait(struct mtd_info *mtd, int state)
if (result == 0) { if (result == 0) {
int retry_cnt = 0; int retry_cnt = 0;
retry: retry:
result = wait_for_completion_timeout(&c->irq_done, if (!wait_for_completion_io_timeout(&c->irq_done,
msecs_to_jiffies(20)); msecs_to_jiffies(20))) {
if (result == 0) {
/* Timeout after 20ms */ /* Timeout after 20ms */
ctrl = read_reg(c, ONENAND_REG_CTRL_STATUS); ctrl = read_reg(c, ONENAND_REG_CTRL_STATUS);
if (ctrl & ONENAND_CTRL_ONGO && if (ctrl & ONENAND_CTRL_ONGO &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment