Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5942ddbc authored by Artem Bityutskiy's avatar Artem Bityutskiy Committed by David Woodhouse
Browse files

mtd: introduce mtd_block_markbad interface

parent 7086c19d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -424,7 +424,7 @@ int INFTL_formatblock(struct INFTLrecord *inftl, int block)
fail:
	/* could not format, update the bad block table (caller is responsible
	   for setting the PUtable to BLOCK_RESERVED on failure) */
	inftl->mbd.mtd->block_markbad(inftl->mbd.mtd, instr->addr);
	mtd_block_markbad(inftl->mbd.mtd, instr->addr);
	return -1;
}

+1 −1
Original line number Diff line number Diff line
@@ -899,7 +899,7 @@ static int mtdchar_ioctl(struct file *file, u_int cmd, u_long arg)
		if (!mtd->block_markbad)
			ret = -EOPNOTSUPP;
		else
			return mtd->block_markbad(mtd, offs);
			return mtd_block_markbad(mtd, offs);
		break;
	}

+1 −1
Original line number Diff line number Diff line
@@ -693,7 +693,7 @@ static int concat_block_markbad(struct mtd_info *mtd, loff_t ofs)
			continue;
		}

		err = subdev->block_markbad(subdev, ofs);
		err = mtd_block_markbad(subdev, ofs);
		if (!err)
			mtd->ecc_stats.badblocks++;
		break;
+1 −1
Original line number Diff line number Diff line
@@ -200,7 +200,7 @@ static void mtdoops_workfunc_erase(struct work_struct *work)
	}

	if (mtd->block_markbad && ret == -EIO) {
		ret = mtd->block_markbad(mtd, cxt->nextpage * record_size);
		ret = mtd_block_markbad(mtd, cxt->nextpage * record_size);
		if (ret < 0) {
			printk(KERN_ERR "mtdoops: block_markbad failed, aborting\n");
			return;
+1 −1
Original line number Diff line number Diff line
@@ -335,7 +335,7 @@ static int part_block_markbad(struct mtd_info *mtd, loff_t ofs)
	if (ofs >= mtd->size)
		return -EINVAL;
	ofs += part->offset;
	res = part->master->block_markbad(part->master, ofs);
	res = mtd_block_markbad(part->master, ofs);
	if (!res)
		mtd->ecc_stats.badblocks++;
	return res;
Loading