aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mtd/mtd.h
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2011-12-30 07:31:57 -0500
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-01-09 13:26:10 -0500
commitcd621274b0ec747db8dedbf857624c067f481976 (patch)
tree1d86dd22d4133fc45311168d1b012e8103b4f875 /include/linux/mtd/mtd.h
parent10934478e44d9a5a7b16dadd89094fb608cf101e (diff)
mtd: do not use mtd->get_unmapped_area directly
Remove direct usage of mtd->get_unmapped_area. Instead, just call 'mtd_get_unmapped_area()' which will return -EOPNOTSUPP if the function is not implemented and test for this error code. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'include/linux/mtd/mtd.h')
-rw-r--r--include/linux/mtd/mtd.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index b355a83e7cc2..2c2a92247e5a 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -280,6 +280,8 @@ static inline unsigned long mtd_get_unmapped_area(struct mtd_info *mtd,
280 unsigned long offset, 280 unsigned long offset,
281 unsigned long flags) 281 unsigned long flags)
282{ 282{
283 if (!mtd->get_unmapped_area)
284 return -EOPNOTSUPP;
283 return mtd->get_unmapped_area(mtd, len, offset, flags); 285 return mtd->get_unmapped_area(mtd, len, offset, flags);
284} 286}
285 287