diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2011-12-28 08:55:42 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-01-09 13:26:09 -0500 |
commit | 10934478e44d9a5a7b16dadd89094fb608cf101e (patch) | |
tree | 603d4f5165fc032a28e5efaa872da685eea7bf32 /include/linux | |
parent | fc002e3c320602d0e206f607aca0460540d7637a (diff) |
mtd: do use mtd->point directly
Remove direct usage of the "mtd->point" function pointer. Instead,
test the mtd_point() return code for '-EOPNOTSUPP'.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/mtd/mtd.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 478701566ba7..b355a83e7cc2 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
@@ -259,6 +259,8 @@ static inline int mtd_point(struct mtd_info *mtd, loff_t from, size_t len, | |||
259 | size_t *retlen, void **virt, resource_size_t *phys) | 259 | size_t *retlen, void **virt, resource_size_t *phys) |
260 | { | 260 | { |
261 | *retlen = 0; | 261 | *retlen = 0; |
262 | if (!mtd->point) | ||
263 | return -EOPNOTSUPP; | ||
262 | return mtd->point(mtd, from, len, retlen, virt, phys); | 264 | return mtd->point(mtd, from, len, retlen, virt, phys); |
263 | } | 265 | } |
264 | 266 | ||