lkml.org 
[lkml]   [2006]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[Suspend2][ 04/19] [Suspend2] Reset modules after invalidating an image.
Date
Reset modules after using them to read an image header and invalidate it,
when the user puts noresume2 on the command line.

Signed-off-by: Nigel Cunningham <nigel@suspend2.net>

kernel/power/io.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/kernel/power/io.c b/kernel/power/io.c
index bfe4468..5c0acdd 100644
--- a/kernel/power/io.c
+++ b/kernel/power/io.c
@@ -111,3 +111,23 @@ void attempt_to_parse_resume_device2(voi
suspend_cleanup_usm();
}

+/* noresume_reset_modules
+ *
+ * Description: When we read the start of an image, modules (and especially the
+ * active writer) might need to reset data structures if we decide
+ * to invalidate the image rather than resuming from it.
+ */
+
+static void noresume_reset_modules(void)
+{
+ struct suspend_module_ops *this_filter;
+
+ list_for_each_entry(this_filter, &suspend_filters, type_list) {
+ if (this_filter->noresume_reset)
+ this_filter->noresume_reset();
+ }
+
+ if (suspend_active_writer && suspend_active_writer->noresume_reset)
+ suspend_active_writer->noresume_reset();
+}
+
--
Nigel Cunningham nigel at suspend2 dot net
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-06-27 01:30    [W:0.075 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site