From 327cf2922b4edf0439b219469722d2a502e37349 Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Fri, 30 Dec 2011 16:35:35 +0200 Subject: mtd: do not use mtd->sync directly This patch teaches 'mtd_sync()' to do nothing when the MTD driver does not have the '->sync()' method, which allows us to remove all direct 'mtd->sync' accesses. Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- drivers/mtd/rfd_ftl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/mtd/rfd_ftl.c') diff --git a/drivers/mtd/rfd_ftl.c b/drivers/mtd/rfd_ftl.c index 5426d42cdea7..233b946e5d66 100644 --- a/drivers/mtd/rfd_ftl.c +++ b/drivers/mtd/rfd_ftl.c @@ -448,8 +448,7 @@ static int reclaim_block(struct partition *part, u_long *old_sector) int rc; /* we have a race if sync doesn't exist */ - if (part->mbd.mtd->sync) - mtd_sync(part->mbd.mtd); + mtd_sync(part->mbd.mtd); score = 0x7fffffff; /* MAX_INT */ best_block = -1; -- cgit v1.2.3