diff options
| author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2011-12-23 12:31:25 -0500 |
|---|---|---|
| committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-01-09 13:25:46 -0500 |
| commit | ead995f8d4da1e2f1ef40b0e5f4133fee38a3d3d (patch) | |
| tree | 349a7f56a4cdc1220a96af3c59285d8e28e0836c /include/linux/mtd | |
| parent | 3fe4bae88460869a8e553397cd9057a4ee7ca341 (diff) | |
mtd: introduce mtd_resume interface
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')
| -rw-r--r-- | include/linux/mtd/mtd.h | 9 |
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 | ||
| 404 | static inline void mtd_resume(struct mtd_info *mtd) | ||
| 405 | { | ||
| 406 | mtd->resume(mtd); | ||
| 407 | } | ||
| 408 | |||
| 406 | static inline struct mtd_info *dev_to_mtd(struct device *dev) | 409 | static 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; |
