diff options
| author | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-02-22 22:04:41 +0000 |
|---|---|---|
| committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-02-22 22:04:41 +0000 |
| commit | 61b80086a525c8a6081257ae40da5dee2bcaee16 (patch) | |
| tree | 675da35e4c03be3a5ca17bf6430e5b51dfed6296 /include/linux/mtd | |
| parent | a5f17d1f4c2831b9b9bf8b1a537cdbac995d6e13 (diff) | |
| parent | 230f984662d7e0e4a9597c665fd4f53130666e7d (diff) | |
Merge branch 'entry-macro-cleanup' of git://sources.calxeda.com/kernel/linux into for-armsoc
Diffstat (limited to 'include/linux/mtd')
| -rw-r--r-- | include/linux/mtd/mtd.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 221295208fd0..d43dc25af82e 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h @@ -427,9 +427,7 @@ static inline int mtd_is_locked(struct mtd_info *mtd, loff_t ofs, uint64_t len) static inline int mtd_suspend(struct mtd_info *mtd) { - if (!mtd->suspend) - return -EOPNOTSUPP; - return mtd->suspend(mtd); + return mtd->suspend ? mtd->suspend(mtd) : 0; } static inline void mtd_resume(struct mtd_info *mtd) @@ -489,7 +487,7 @@ static inline int mtd_has_oob(const struct mtd_info *mtd) static inline int mtd_can_have_bb(const struct mtd_info *mtd) { - return 0; + return !!mtd->block_isbad; } /* Kernel-side ioctl definitions */ |
