|author||Johannes Berg <email@example.com>||2007-04-30 15:09:55 -0700|
|committer||Linus Torvalds <firstname.lastname@example.org>||2007-04-30 16:40:40 -0700|
|parent||power management: implement pm_ops.valid for everybody (diff)|
power management: force pm_ops.valid callback to be assigned
This patch changes the docs and behaviour from "all states valid" to "no states valid" if no .valid callback is assigned. Users of pm_ops that only need mem sleep can assign pm_valid_only_mem without any overhead, others will require more elaborate callbacks. Now that all users of pm_ops have a .valid callback this is a safe thing to do and prevents things from getting messy again as they were before. Signed-off-by: Johannes Berg <email@example.com> Acked-by: Pavel Machek <firstname.lastname@example.org> Looks-okay-to: Rafael J. Wysocki <email@example.com> Cc: <firstname.lastname@example.org> Cc: Greg KH <email@example.com> Signed-off-by: Andrew Morton <firstname.lastname@example.org> Signed-off-by: Linus Torvalds <email@example.com>
Diffstat (limited to 'include')
1 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/pm.h b/include/linux/pm.h
index 6035209cf31e..7a516690dcb3 100644
@@ -125,12 +125,12 @@ typedef int __bitwise suspend_disk_method_t;
* struct pm_ops - Callbacks for managing platform dependent suspend states.
* @valid: Callback to determine whether the given state can be entered.
* If %CONFIG_SOFTWARE_SUSPEND is set then %PM_SUSPEND_DISK is
- * always valid and never passed to this call.
- * If not assigned, all suspend states are advertised as valid
- * in /sys/power/state (but can still be rejected by prepare or enter.)
- * Since new states can be added for other platforms, you should
- * assign this callback. There is a %pm_valid_only_mem function
- * available if you only implemented mem sleep.
+ * always valid and never passed to this call. If not assigned,
+ * no suspend states are valid.
+ * Valid states are advertised in /sys/power/state but can still
+ * be rejected by prepare or enter if the conditions aren't right.
+ * There is a %pm_valid_only_mem function available that can be assigned
+ * to this if you only implement mem sleep.
* @prepare: Prepare the platform for the given suspend state. Can return a
* negative error code if necessary.