summaryrefslogtreecommitdiffstats
path: root/include/linux/preempt.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-12-15 16:04:03 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-12-27 11:49:56 -0500
commit2b010a69350f2c995f40585fb801904874c85dd1 (patch)
tree16f479e7c194ae22d01a42009069ee92d21ca3b9 /include/linux/preempt.h
parent932562a6045ed613d45bd100db37114273c22077 (diff)
downloadlinux-2b010a69350f2c995f40585fb801904874c85dd1.tar.gz
linux-2b010a69350f2c995f40585fb801904874c85dd1.tar.bz2
linux-2b010a69350f2c995f40585fb801904874c85dd1.zip
preempt.h: Kill dependency on list.h
We really only need types.h, list.h is big. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'include/linux/preempt.h')
-rw-r--r--include/linux/preempt.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/preempt.h b/include/linux/preempt.h
index 9aa6358a1a16..7233e9cf1bab 100644
--- a/include/linux/preempt.h
+++ b/include/linux/preempt.h
@@ -9,7 +9,7 @@
#include <linux/linkage.h>
#include <linux/cleanup.h>
-#include <linux/list.h>
+#include <linux/types.h>
/*
* We put the hardirq and softirq counter into the preemption
@@ -360,7 +360,9 @@ void preempt_notifier_unregister(struct preempt_notifier *notifier);
static inline void preempt_notifier_init(struct preempt_notifier *notifier,
struct preempt_ops *ops)
{
- INIT_HLIST_NODE(&notifier->link);
+ /* INIT_HLIST_NODE() open coded, to avoid dependency on list.h */
+ notifier->link.next = NULL;
+ notifier->link.pprev = NULL;
notifier->ops = ops;
}