[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20190821164655.5860-1-ikegami.t@gmail.com>
Date: Thu, 22 Aug 2019 01:46:51 +0900
From: Tokunori Ikegami <ikegami.t@...il.com>
To: linux-mtd@...ts.infradead.org
Cc: Tokunori Ikegami <ikegami.t@...il.com>,
David Woodhouse <dwmw2@...radead.org>,
Brian Norris <computersforpeace@...il.com>,
Marek Vasut <marek.vasut@...il.com>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>,
"Gustavo A. R. Silva" <gustavo@...eddedor.com>,
Chris Packham <chris.packham@...iedtelesis.co.nz>,
Liu Jian <liujian56@...wei.com>,
linux-kernel@...r.kernel.org (open list)
Subject: [PATCH] mtd: cfi_cmdset_0002: Fix do_erase_chip() to get chip as erasing mode
The chip state is set to erasing by the function after getting chip.
So it should be to get chip as erasing mode at first.
But previously it was to get chip as writing mode then fix as erasing.
Signed-off-by: Tokunori Ikegami <ikegami.t@...il.com>
Cc: linux-mtd@...ts.infradead.org
---
drivers/mtd/chips/cfi_cmdset_0002.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
index f4da7bd552e9..74b07a0bdaa2 100644
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -2344,7 +2344,7 @@ static int __xipram do_erase_chip(struct map_info *map, struct flchip *chip)
adr = cfi->addr_unlock1;
mutex_lock(&chip->mutex);
- ret = get_chip(map, chip, adr, FL_WRITING);
+ ret = get_chip(map, chip, adr, FL_ERASING);
if (ret) {
mutex_unlock(&chip->mutex);
return ret;
--
2.11.0
Powered by blists - more mailing lists