aboutsummaryrefslogtreecommitdiff
path: root/include/linux/rbtree_augmented.h
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2013-01-22 11:20:18 -0800
committerOlof Johansson <olof@lixom.net>2013-01-22 11:20:29 -0800
commit51edce0ccee090ea762a3014510e7870d25c49df (patch)
treeb960c6e50a318cb3a737f31323fe50246a87a0f3 /include/linux/rbtree_augmented.h
parentb2555b877bf9faf7045ae362ca051590e79167cf (diff)
parent7662a9c60fee25d7234da4be6d8eab2b2ac88448 (diff)
Merge tag 'omap-for-v3.8-rc4/fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
From Tony Lindgren: Minimal omap fixes for the -rc series: - A build fix for recently merged omap DRM changes - Regression fixes from the common clock framework conversion for omap4 audio and omap2 reboot - Regression fix for pandaboard WLAN control UART muxing caused by u-boot only muxing essential pins nowadays - Timer iteration fix for CONFIG_OF_DYNAMIC - A section mismatch fix for ocp2scp init * tag 'omap-for-v3.8-rc4/fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (306 commits) ARM: OMAP2+: omap4-panda: add UART2 muxing for WiLink shared transport ARM: OMAP2+: DT node Timer iteration fix ARM: OMAP2+: Fix section warning for omap_init_ocp2scp() ARM: OMAP2+: fix build break for omapdrm ARM: OMAP2: Fix missing omap2xxx_clkt_vps_late_init function calls ARM: OMAP4: hwmod_data: Correct IDLEMODE for McPDM ARM: OMAP4: clock data: Lock ABE DPLL on all revisions + Linux 3.8-rc4 Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'include/linux/rbtree_augmented.h')
-rw-r--r--include/linux/rbtree_augmented.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/include/linux/rbtree_augmented.h b/include/linux/rbtree_augmented.h
index 2ac60c9cf64..fea49b5da12 100644
--- a/include/linux/rbtree_augmented.h
+++ b/include/linux/rbtree_augmented.h
@@ -123,9 +123,9 @@ __rb_change_child(struct rb_node *old, struct rb_node *new,
extern void __rb_erase_color(struct rb_node *parent, struct rb_root *root,
void (*augment_rotate)(struct rb_node *old, struct rb_node *new));
-static __always_inline void
-rb_erase_augmented(struct rb_node *node, struct rb_root *root,
- const struct rb_augment_callbacks *augment)
+static __always_inline struct rb_node *
+__rb_erase_augmented(struct rb_node *node, struct rb_root *root,
+ const struct rb_augment_callbacks *augment)
{
struct rb_node *child = node->rb_right, *tmp = node->rb_left;
struct rb_node *parent, *rebalance;
@@ -217,6 +217,14 @@ rb_erase_augmented(struct rb_node *node, struct rb_root *root,
}
augment->propagate(tmp, NULL);
+ return rebalance;
+}
+
+static __always_inline void
+rb_erase_augmented(struct rb_node *node, struct rb_root *root,
+ const struct rb_augment_callbacks *augment)
+{
+ struct rb_node *rebalance = __rb_erase_augmented(node, root, augment);
if (rebalance)
__rb_erase_color(rebalance, root, augment->rotate);
}