summaryrefslogtreecommitdiff
path: root/include/linux/mtd/mtd.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2012-02-24 13:23:23 +0900
committerPaul Mundt <lethal@linux-sh.org>2012-02-24 13:23:23 +0900
commit35eb304b5cd7b49d581bda79218b8134f3b689ea (patch)
tree3d75d9ada70814161d035b2f9166fee05d257dfb /include/linux/mtd/mtd.h
parentca0cc30109241f280eb871794620d7cf198bb582 (diff)
parentbb4c7e9a9908548b458f34afb2fee74dc0d49f90 (diff)
downloadlinux-3.10-35eb304b5cd7b49d581bda79218b8134f3b689ea.tar.gz
linux-3.10-35eb304b5cd7b49d581bda79218b8134f3b689ea.tar.bz2
linux-3.10-35eb304b5cd7b49d581bda79218b8134f3b689ea.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into rmobile-fixes-for-linus
Diffstat (limited to 'include/linux/mtd/mtd.h')
-rw-r--r--include/linux/mtd/mtd.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 1a81fde8f33..d43dc25af82 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)
@@ -441,7 +439,7 @@ static inline void mtd_resume(struct mtd_info *mtd)
static inline int mtd_block_isbad(struct mtd_info *mtd, loff_t ofs)
{
if (!mtd->block_isbad)
- return -EOPNOTSUPP;
+ return 0;
return mtd->block_isbad(mtd, ofs);
}