diff options
author | Brian Norris <computersforpeace@gmail.com> | 2012-06-22 19:35:38 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-07-06 13:16:24 -0400 |
commit | d2d48480d16ab349ae5d4732b4d79ff48b4b4171 (patch) | |
tree | aae192d64d1c8306aceae349cc4505ec4f9d790d | |
parent | 596fd46268634082314b3af1ded4612e1b7f3f03 (diff) |
mtd: move mtd_read_oob() definition out of mtd.h
mtd_read_oob() will be expanded a little, so don't leave it in the header
as a static inline function.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
-rw-r--r-- | drivers/mtd/mtdcore.c | 9 | ||||
-rw-r--r-- | include/linux/mtd/mtd.h | 9 |
2 files changed, 10 insertions, 8 deletions
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index 575730744fdb..fcfce24f87d1 100644 --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c | |||
@@ -858,6 +858,15 @@ int mtd_panic_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, | |||
858 | } | 858 | } |
859 | EXPORT_SYMBOL_GPL(mtd_panic_write); | 859 | EXPORT_SYMBOL_GPL(mtd_panic_write); |
860 | 860 | ||
861 | int mtd_read_oob(struct mtd_info *mtd, loff_t from, struct mtd_oob_ops *ops) | ||
862 | { | ||
863 | ops->retlen = ops->oobretlen = 0; | ||
864 | if (!mtd->_read_oob) | ||
865 | return -EOPNOTSUPP; | ||
866 | return mtd->_read_oob(mtd, from, ops); | ||
867 | } | ||
868 | EXPORT_SYMBOL_GPL(mtd_read_oob); | ||
869 | |||
861 | /* | 870 | /* |
862 | * Method to access the protection register area, present in some flash | 871 | * Method to access the protection register area, present in some flash |
863 | * devices. The user data is one time programmable but the factory data is read | 872 | * devices. The user data is one time programmable but the factory data is read |
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 63dadc0dfb62..81d61e704599 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
@@ -265,14 +265,7 @@ int mtd_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, | |||
265 | int mtd_panic_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, | 265 | int mtd_panic_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, |
266 | const u_char *buf); | 266 | const u_char *buf); |
267 | 267 | ||
268 | static inline int mtd_read_oob(struct mtd_info *mtd, loff_t from, | 268 | int mtd_read_oob(struct mtd_info *mtd, loff_t from, struct mtd_oob_ops *ops); |
269 | struct mtd_oob_ops *ops) | ||
270 | { | ||
271 | ops->retlen = ops->oobretlen = 0; | ||
272 | if (!mtd->_read_oob) | ||
273 | return -EOPNOTSUPP; | ||
274 | return mtd->_read_oob(mtd, from, ops); | ||
275 | } | ||
276 | 269 | ||
277 | static inline int mtd_write_oob(struct mtd_info *mtd, loff_t to, | 270 | static inline int mtd_write_oob(struct mtd_info *mtd, loff_t to, |
278 | struct mtd_oob_ops *ops) | 271 | struct mtd_oob_ops *ops) |