summaryrefslogtreecommitdiff
path: root/kernel/power
diff options
context:
space:
mode:
authorDavidlohr Bueso <dave@gnu.org>2012-10-23 01:21:09 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2012-11-15 00:37:08 +0100
commit8316bd72c0248adbb9572abf2dd045a95f682bcd (patch)
treead2c06325c8ac48109c04055fe6375293d5d98ca /kernel/power
parent883ee4f79d636d13f24c2479c66d42cb652b0239 (diff)
downloadlinux-8316bd72c0248adbb9572abf2dd045a95f682bcd.tar.gz
PM / Hibernate: use rb_entry
Since the software suspend extents are organized in an rbtree, use rb_entry instead of container_of, as it is semantically more appropriate in order to get a node as it is iterated. Signed-off-by: Davidlohr Bueso <dave@gnu.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'kernel/power')
-rw-r--r--kernel/power/swap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/power/swap.c b/kernel/power/swap.c
index 3c9d764eb0d8..7c33ed200410 100644
--- a/kernel/power/swap.c
+++ b/kernel/power/swap.c
@@ -126,7 +126,7 @@ static int swsusp_extents_insert(unsigned long swap_offset)
/* Figure out where to put the new node */
while (*new) {
- ext = container_of(*new, struct swsusp_extent, node);
+ ext = rb_entry(*new, struct swsusp_extent, node);
parent = *new;
if (swap_offset < ext->start) {
/* Try to merge */