aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorYang Ruirui <ruirui.r.yang@tieto.com>2011-03-14 09:50:56 +0800
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-03-25 17:04:18 +0200
commite21fa86ad0ffa2c292b104ea19bdaa46ceab7105 (patch)
tree9baf6f805b94d26196d001f883197843fde65cba /drivers
parentfc2ff592b5b41f3f32e790dd124eeb3bc80706c8 (diff)
mtdswap: kill strict error handling option
As Artem Bityutskiy suggested: this option is controversial, as we do not really have any prove it is useful. And it is too much to have it as a config parameter. So, better kill it and let the real mtdswap users decide whether it is needed or not. Signed-off-by: Yang Ruirui<ruirui.r.yang@tieto.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/Kconfig8
-rw-r--r--drivers/mtd/mtdswap.c8
2 files changed, 1 insertions, 15 deletions
diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
index 5fe01d55665..b4567c35a32 100644
--- a/drivers/mtd/Kconfig
+++ b/drivers/mtd/Kconfig
@@ -335,14 +335,6 @@ config MTD_SWAP
The driver provides wear leveling by storing erase counter into the
OOB.
-config MTD_SWAP_STRICT
- bool "Strict erase error handling"
- depends on MTD_SWAP
- help
- Enables strict tolerance on failed erasures, marking erase blocks bad
- right after the first failed operation. With non-strict mode the
- erase operation is retried.
-
source "drivers/mtd/chips/Kconfig"
source "drivers/mtd/maps/Kconfig"
diff --git a/drivers/mtd/mtdswap.c b/drivers/mtd/mtdswap.c
index a65594fee4a..dc4b136800b 100644
--- a/drivers/mtd/mtdswap.c
+++ b/drivers/mtd/mtdswap.c
@@ -156,12 +156,6 @@ struct mtdswap_oobdata {
#define MTDSWAP_ERASE_RETRIES 3 /* Before marking erase block bad */
#define MTDSWAP_IO_RETRIES 3
-#ifdef CONFIG_MTD_SWAP_STRICT
-#define MTDSWAP_STRICT 1
-#else
-#define MTDSWAP_STRICT 0
-#endif
-
enum {
MTDSWAP_SCANNED_CLEAN,
MTDSWAP_SCANNED_DIRTY,
@@ -575,7 +569,7 @@ retry:
ret = mtd->erase(mtd, &erase);
if (ret) {
- if (retries++ < MTDSWAP_ERASE_RETRIES && !MTDSWAP_STRICT) {
+ if (retries++ < MTDSWAP_ERASE_RETRIES) {
dev_warn(d->dev,
"erase of erase block %#llx on %s failed",
erase.addr, mtd->name);