aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices/mtdram.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-02-03 13:20:43 +0200
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-03-27 00:27:19 +0100
commit5e4e6e3fdf48c1b012e2b6e80ed1d7e99d4fa6d1 (patch)
treedade127061f6c466f4146152572cc17c05d44761 /drivers/mtd/devices/mtdram.c
parentmtd: nand: write BBM to OOB even with flash-based BBT (diff)
downloadlinux-dev-5e4e6e3fdf48c1b012e2b6e80ed1d7e99d4fa6d1.tar.xz
linux-dev-5e4e6e3fdf48c1b012e2b6e80ed1d7e99d4fa6d1.zip
mtd: return error code from mtd_unpoint
The 'mtd_unpoint()' API function should be able to return an error code because it may fail if you specify incorrect offset. This patch changes this MTD API function and amends all the drivers correspondingly. Also return '-EOPNOTSUPP' from 'mtd_unpoint()' when the '->unpoint()' method is undefined. We do not really need this currently, but this just makes sense to be consistent with 'mtd_point()'. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/devices/mtdram.c')
-rw-r--r--drivers/mtd/devices/mtdram.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/devices/mtdram.c b/drivers/mtd/devices/mtdram.c
index 91030cfb03b3..e1f017bf0777 100644
--- a/drivers/mtd/devices/mtdram.c
+++ b/drivers/mtd/devices/mtdram.c
@@ -60,8 +60,9 @@ static int ram_point(struct mtd_info *mtd, loff_t from, size_t len,
return 0;
}
-static void ram_unpoint(struct mtd_info *mtd, loff_t from, size_t len)
+static int ram_unpoint(struct mtd_info *mtd, loff_t from, size_t len)
{
+ return 0;
}
/*