summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/raw/r852.c
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@bootlin.com>2018-11-20 11:57:19 +0100
committerMiquel Raynal <miquel.raynal@bootlin.com>2019-02-05 15:39:40 +0100
commit661803b23330daa7839680cca43ab410955c3f10 (patch)
tree37ff46b2e659c74f11cf027b09e4784cb13a9226 /drivers/mtd/nand/raw/r852.c
parentefe5d132cb5089ec049ea8d95be8e4f01d3d3e0d (diff)
mtd: rawnand: Stop using chip->state in drivers
We are about to simplify the locking in the rawnand framework, and part of this simplication is about getting rid of chip->state, so let's first patch drivers that check the state. All of them do that to get a timeout value based on the operation that is being executed. Since a timeout is, by definition, something that is here to prevent hanging on an event that might never happen, picking the maximum timeout value no matter the operation should be harmless. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'drivers/mtd/nand/raw/r852.c')
-rw-r--r--drivers/mtd/nand/raw/r852.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/nand/raw/r852.c b/drivers/mtd/nand/raw/r852.c
index c01422d953dd..86456216fb93 100644
--- a/drivers/mtd/nand/raw/r852.c
+++ b/drivers/mtd/nand/raw/r852.c
@@ -369,8 +369,7 @@ static int r852_wait(struct nand_chip *chip)
unsigned long timeout;
u8 status;
- timeout = jiffies + (chip->state == FL_ERASING ?
- msecs_to_jiffies(400) : msecs_to_jiffies(20));
+ timeout = jiffies + msecs_to_jiffies(400);
while (time_before(jiffies, timeout))
if (chip->legacy.dev_ready(chip))