Skip to contentSkip to conversation

mtdcore: Fix a build error with CONFIG_CMD_MTDPARTS_SPREAD

PATCH New Maxin B. John 1 participant 1 message Jul 7, 2014 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 mtdcore: Fix a build error with CONFIG_CMD_MTDPARTS_SPREAD

This patch fixes the build error for CONFIG_CMD_MTDPARTS_SPREAD introduced by the commit:

commit dfe64e2c89731a3f9950d7acd8681b68df2bae03

Author: Sergey Lapin <[email protected]>
Date:   Mon Jan 14 03:46:50 2013 +0000

mtd: resync with Linux-3.7.1

v2 changes:
Rebased the patch against Heiko's code base:
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/189358
So,Heiko's update should be applied first.

---
 drivers/mtd/mtdcore.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/mtdcore.c +2 -2
index 796ac07..3596b06 100644
@@ -802,7 +802,7 @@ void mtd_get_len_incl_bad(struct mtd_info *mtd, uint64_t offset,
 	*truncated = 0;
 	*len_incl_bad = 0;
 
-	if (!mtd->block_isbad) {
+	if (!mtd->_block_isbad) {
 		*len_incl_bad = length;
 		return;
 	}
@@ -818,7 +818,7 @@ void mtd_get_len_incl_bad(struct mtd_info *mtd, uint64_t offset,
 
 		block_len = mtd->erasesize - (offset & (mtd->erasesize - 1));
 
-		if (!mtd->block_isbad(mtd, offset & ~(mtd->erasesize - 1)))
+		if (!mtd->_block_isbad(mtd, offset & ~(mtd->erasesize - 1)))
 			len_excl_bad += block_len;
 
 		*len_incl_bad += block_len;
Signature · 1 line
1.7.5.4