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

Commit 85f2f2a8 authored by Artem Bityutskiy's avatar Artem Bityutskiy Committed by David Woodhouse
Browse files

mtd: introduce mtd_sync interface

parent b0a31f7b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -651,7 +651,7 @@ static int reclaim_block(partition_t *part)
		pr_debug("ftl_cs: waiting for transfer "
		      "unit to be prepared...\n");
		if (part->mbd.mtd->sync)
			part->mbd.mtd->sync(part->mbd.mtd);
			mtd_sync(part->mbd.mtd);
	    } else {
		static int ne = 0;
		if (++ne < 5)
+2 −2
Original line number Diff line number Diff line
@@ -323,7 +323,7 @@ static int mtdblock_release(struct mtd_blktrans_dev *mbd)
	if (!--mtdblk->count) {
		/* It was the last usage. Free the cache */
		if (mbd->mtd->sync)
			mbd->mtd->sync(mbd->mtd);
			mtd_sync(mbd->mtd);
		vfree(mtdblk->cache_data);
	}

@@ -343,7 +343,7 @@ static int mtdblock_flush(struct mtd_blktrans_dev *dev)
	mutex_unlock(&mtdblk->cache_mutex);

	if (dev->mtd->sync)
		dev->mtd->sync(dev->mtd);
		mtd_sync(dev->mtd);
	return 0;
}

+1 −1
Original line number Diff line number Diff line
@@ -155,7 +155,7 @@ static int mtdchar_close(struct inode *inode, struct file *file)

	/* Only sync if opened RW */
	if ((file->f_mode & FMODE_WRITE) && mtd->sync)
		mtd->sync(mtd);
		mtd_sync(mtd);

	iput(mfi->ino);

+1 −1
Original line number Diff line number Diff line
@@ -620,7 +620,7 @@ static void concat_sync(struct mtd_info *mtd)

	for (i = 0; i < concat->num_subdev; i++) {
		struct mtd_info *subdev = concat->subdev[i];
		subdev->sync(subdev);
		mtd_sync(subdev);
	}
}

+1 −1
Original line number Diff line number Diff line
@@ -301,7 +301,7 @@ static int part_is_locked(struct mtd_info *mtd, loff_t ofs, uint64_t len)
static void part_sync(struct mtd_info *mtd)
{
	struct mtd_part *part = PART(mtd);
	part->master->sync(part->master);
	mtd_sync(part->master);
}

static int part_suspend(struct mtd_info *mtd)
Loading