diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mtd/mtd.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 6c91ba59c229..089370758fc9 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
| @@ -427,12 +427,15 @@ static inline int mtd_is_locked(struct mtd_info *mtd, loff_t ofs, uint64_t len) | |||
| 427 | 427 | ||
| 428 | static inline int mtd_suspend(struct mtd_info *mtd) | 428 | static inline int mtd_suspend(struct mtd_info *mtd) |
| 429 | { | 429 | { |
| 430 | if (!mtd->suspend) | ||
| 431 | return -EOPNOTSUPP; | ||
| 430 | return mtd->suspend(mtd); | 432 | return mtd->suspend(mtd); |
| 431 | } | 433 | } |
| 432 | 434 | ||
| 433 | static inline void mtd_resume(struct mtd_info *mtd) | 435 | static inline void mtd_resume(struct mtd_info *mtd) |
| 434 | { | 436 | { |
| 435 | mtd->resume(mtd); | 437 | if (mtd->resume) |
| 438 | mtd->resume(mtd); | ||
| 436 | } | 439 | } |
| 437 | 440 | ||
| 438 | static inline int mtd_block_isbad(struct mtd_info *mtd, loff_t ofs) | 441 | static inline int mtd_block_isbad(struct mtd_info *mtd, loff_t ofs) |
