summaryrefslogtreecommitdiff
path: root/lib/interval_tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/interval_tree.c')
-rw-r--r--lib/interval_tree.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/interval_tree.c b/lib/interval_tree.c
index 77a793e0644b..e6eb406f2d65 100644
--- a/lib/interval_tree.c
+++ b/lib/interval_tree.c
@@ -1,13 +1,10 @@
#include <linux/init.h>
#include <linux/interval_tree.h>
+#include <linux/interval_tree_generic.h>
-#define ITSTRUCT struct interval_tree_node
-#define ITRB rb
-#define ITTYPE unsigned long
-#define ITSUBTREE __subtree_last
-#define ITSTART(n) ((n)->start)
-#define ITLAST(n) ((n)->last)
-#define ITSTATIC
-#define ITPREFIX interval_tree
+#define START(node) ((node)->start)
+#define LAST(node) ((node)->last)
-#include <linux/interval_tree_tmpl.h>
+INTERVAL_TREE_DEFINE(struct interval_tree_node, rb,
+ unsigned long, __subtree_last,
+ START, LAST,, interval_tree)