aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mtd
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mtd')
-rw-r--r--include/linux/mtd/mtd.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 8e01bad44e25..d6b4aa177505 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -211,15 +211,13 @@ struct mtd_info {
211 int (*unlock) (struct mtd_info *mtd, loff_t ofs, uint64_t len); 211 int (*unlock) (struct mtd_info *mtd, loff_t ofs, uint64_t len);
212 int (*is_locked) (struct mtd_info *mtd, loff_t ofs, uint64_t len); 212 int (*is_locked) (struct mtd_info *mtd, loff_t ofs, uint64_t len);
213 int (*suspend) (struct mtd_info *mtd); 213 int (*suspend) (struct mtd_info *mtd);
214 void (*resume) (struct mtd_info *mtd);
214 215
215 /* Backing device capabilities for this device 216 /* Backing device capabilities for this device
216 * - provides mmap capabilities 217 * - provides mmap capabilities
217 */ 218 */
218 struct backing_dev_info *backing_dev_info; 219 struct backing_dev_info *backing_dev_info;
219 220
220 /* Power Management functions */
221 void (*resume) (struct mtd_info *mtd);
222
223 /* Bad block management functions */ 221 /* Bad block management functions */
224 int (*block_isbad) (struct mtd_info *mtd, loff_t ofs); 222 int (*block_isbad) (struct mtd_info *mtd, loff_t ofs);
225 int (*block_markbad) (struct mtd_info *mtd, loff_t ofs); 223 int (*block_markbad) (struct mtd_info *mtd, loff_t ofs);
@@ -403,6 +401,11 @@ static inline int mtd_suspend(struct mtd_info *mtd)
403 return mtd->suspend(mtd); 401 return mtd->suspend(mtd);
404} 402}
405 403
404static inline void mtd_resume(struct mtd_info *mtd)
405{
406 mtd->resume(mtd);
407}
408
406static inline struct mtd_info *dev_to_mtd(struct device *dev) 409static inline struct mtd_info *dev_to_mtd(struct device *dev)
407{ 410{
408 return dev ? dev_get_drvdata(dev) : NULL; 411 return dev ? dev_get_drvdata(dev) : NULL;