aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mtd
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mtd')
-rw-r--r--include/linux/mtd/mtd.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 2fb83cd3d264..0db8d87ce451 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -188,6 +188,8 @@ struct mtd_info {
188 size_t *retlen, const u_char *buf); 188 size_t *retlen, const u_char *buf);
189 int (*panic_write) (struct mtd_info *mtd, loff_t to, size_t len, 189 int (*panic_write) (struct mtd_info *mtd, loff_t to, size_t len,
190 size_t *retlen, const u_char *buf); 190 size_t *retlen, const u_char *buf);
191 int (*read_oob) (struct mtd_info *mtd, loff_t from,
192 struct mtd_oob_ops *ops);
191 193
192 /* Backing device capabilities for this device 194 /* Backing device capabilities for this device
193 * - provides mmap capabilities 195 * - provides mmap capabilities
@@ -195,8 +197,6 @@ struct mtd_info {
195 struct backing_dev_info *backing_dev_info; 197 struct backing_dev_info *backing_dev_info;
196 198
197 199
198 int (*read_oob) (struct mtd_info *mtd, loff_t from,
199 struct mtd_oob_ops *ops);
200 int (*write_oob) (struct mtd_info *mtd, loff_t to, 200 int (*write_oob) (struct mtd_info *mtd, loff_t to,
201 struct mtd_oob_ops *ops); 201 struct mtd_oob_ops *ops);
202 202
@@ -320,6 +320,12 @@ static inline int mtd_panic_write(struct mtd_info *mtd, loff_t to, size_t len,
320 return mtd->panic_write(mtd, to, len, retlen, buf); 320 return mtd->panic_write(mtd, to, len, retlen, buf);
321} 321}
322 322
323static inline int mtd_read_oob(struct mtd_info *mtd, loff_t from,
324 struct mtd_oob_ops *ops)
325{
326 return mtd->read_oob(mtd, from, ops);
327}
328
323static inline struct mtd_info *dev_to_mtd(struct device *dev) 329static inline struct mtd_info *dev_to_mtd(struct device *dev)
324{ 330{
325 return dev ? dev_get_drvdata(dev) : NULL; 331 return dev ? dev_get_drvdata(dev) : NULL;