Thread (14 messages) 14 messages, 5 authors, 2012-02-02
STALE5247d

[PATCH RFC 2/2] mtd : Make the mtd_suspend return 0 if the suspend is not implemented

From: Shubhrajyoti <hidden>
Date: 2012-01-24 08:52:28
Also in: linux-omap

On Tuesday 24 January 2012 01:39 PM, Brian Norris wrote:
Hi,

On Mon, Jan 23, 2012 at 12:12 AM, Shubhrajyoti D [off-list ref] wrote:
...
quoted
 include/linux/mtd/mtd.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 1a81fde..c717bb6 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -427,9 +427,9 @@ 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);
+       if (mtd->suspend)
+               return mtd->suspend(mtd);
+       return 0;
 }

 static inline void mtd_resume(struct mtd_info *mtd)
I believe this fix is already accounted for in Artem Bityutskiy's
l2-mtd-2.6 repository as:

commit 091a7fe219ee8d3e76be9e02221433af10c6f574
mtd: fix MTD suspend
(http://git.infradead.org/users/dedekind/l2-mtd-2.6.git/commit/091a7fe219ee8d3e76be9e02221433af10c6f574)

However, the bug made it into the 3.3 merge window, so shouldn't this
bugfix be sent upstream immediately?
OK thanks for pointing that.
Brian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help