summaryrefslogtreecommitdiff
path: root/drivers/mtd/onenand
diff options
context:
space:
mode:
authorLadislav Michl <ladis@linux-mips.org>2018-01-12 14:14:54 +0100
committerBoris Brezillon <boris.brezillon@free-electrons.com>2018-01-12 15:34:15 +0100
commitd120568883a4676852caab2e3545c0d1a623376b (patch)
treece29bbc47b0191c1ca5f5b981aa25e08b6a3051d /drivers/mtd/onenand
parentfafc0b3a9f7b586ae1261b2f78e389bd67df92d7 (diff)
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>
Diffstat (limited to 'drivers/mtd/onenand')
-rw-r--r--drivers/mtd/onenand/omap2.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
index 883993bbe40b..0e7772e16d75 100644
--- a/drivers/mtd/onenand/omap2.c
+++ b/drivers/mtd/onenand/omap2.c
@@ -170,9 +170,8 @@ static int omap2_onenand_wait(struct mtd_info *mtd, int state)
if (result == 0) {
int retry_cnt = 0;
retry:
- result = wait_for_completion_timeout(&c->irq_done,
- msecs_to_jiffies(20));
- if (result == 0) {
+ if (!wait_for_completion_io_timeout(&c->irq_done,
+ msecs_to_jiffies(20))) {
/* Timeout after 20ms */
ctrl = read_reg(c, ONENAND_REG_CTRL_STATUS);
if (ctrl & ONENAND_CTRL_ONGO &&