diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-02-20 16:26:13 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-02-20 16:26:13 +0300 |
commit | fccddb25e1ec96bd11cd0fc6aa097899a9a8b44b (patch) | |
tree | fbd4f4d0f88a6972a7995fa60698766310069035 /kernel | |
parent | 58339feae7133f1be6228b7ab56a147712aa0a92 (diff) | |
parent | 00bb3998829783157ccf1343abcccd38a604bc64 (diff) | |
download | linux-fccddb25e1ec96bd11cd0fc6aa097899a9a8b44b.tar.xz |
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.c | 2 | ||||
-rw-r--r-- | kernel/power/swap.c | 2 |
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)); |