summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-02-20 14:26:13 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-02-20 14:26:13 +0100
commitfccddb25e1ec96bd11cd0fc6aa097899a9a8b44b (patch)
treefbd4f4d0f88a6972a7995fa60698766310069035 /kernel
parent58339feae7133f1be6228b7ab56a147712aa0a92 (diff)
parent00bb3998829783157ccf1343abcccd38a604bc64 (diff)
Merge branch 'pm-sleep'
* pm-sleep: PM / Documentation: Spelling s/wrtie/write/ PM / sleep: Fix test_suspend after sleep state rework PM / Hibernate: Use rb_entry() instead of container_of()
Diffstat (limited to 'kernel')
-rw-r--r--kernel/power/suspend_test.c2
-rw-r--r--kernel/power/swap.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/kernel/power/suspend_test.c b/kernel/power/suspend_test.c
index bdff5ed57f10..5db217051232 100644
--- a/kernel/power/suspend_test.c
+++ b/kernel/power/suspend_test.c
@@ -166,7 +166,7 @@ static int __init setup_test_suspend(char *value)
return 0;
}
- for (i = 0; pm_labels[i]; i++)
+ for (i = PM_SUSPEND_MIN; i < PM_SUSPEND_MAX; i++)
if (!strcmp(pm_labels[i], suspend_type)) {
test_state_label = pm_labels[i];
return 0;
diff --git a/kernel/power/swap.c b/kernel/power/swap.c
index 32e0c232efba..f80fd33639e0 100644
--- a/kernel/power/swap.c
+++ b/kernel/power/swap.c
@@ -201,7 +201,7 @@ void free_all_swap_pages(int swap)
struct swsusp_extent *ext;
unsigned long offset;
- ext = container_of(node, struct swsusp_extent, node);
+ ext = rb_entry(node, struct swsusp_extent, node);
rb_erase(node, &swsusp_extents);
for (offset = ext->start; offset <= ext->end; offset++)
swap_free(swp_entry(swap, offset));