@@ -329,45 +329,6 @@ static int memcmpb(void *a, int c, int n)
return 0;
}
-/*
- * check_free_sector: check if a free sector is actually FREE,
- * i.e. All 0xff in data and oob area.
- */
-static int check_free_sectors(struct INFTLrecord *inftl, unsigned int address,
- int len, int check_oob)
-{
- u8 buf[SECTORSIZE + inftl->mbd.mtd->oobsize];
- struct mtd_info *mtd = inftl->mbd.mtd;
- size_t retlen;
- int i;
-
- for (i = 0; i < len; i += SECTORSIZE) {
- if (mtd_read(mtd, address, SECTORSIZE, &retlen, buf))
- return -1;
- if (memcmpb(buf, 0xff, SECTORSIZE) != 0)
- return -1;
-
- if (check_oob) {
- if(inftl_read_oob(mtd, address, mtd->oobsize,
- &retlen, &buf[SECTORSIZE]) < 0)
- return -1;
- if (memcmpb(buf + SECTORSIZE, 0xff, mtd->oobsize) != 0)
- return -1;
- }
- address += SECTORSIZE;
- }
-
- return 0;
-}
-
-/*
- * INFTL_format: format a Erase Unit by erasing ALL Erase Zones in the Erase
- * Unit and Update INFTL metadata. Each erase operation is
- * checked with check_free_sectors.
- *
- * Return: 0 when succeed, -1 on error.
- *
- */
int INFTL_formatblock(struct INFTLrecord *inftl, int block)
{
size_t retlen;
Removes the no longer required function,check_free_sectors as this functions only caller,INFTL_formatblock has removed it's call to check_free_sectors. Signed-off-by: Nicholas Krause <xerofoify@gmail.com> --- drivers/mtd/inftlmount.c | 39 --------------------------------------- 1 file changed, 39 deletions(-)