timers: Split out timer_types.h
authorKent Overstreet <kent.overstreet@linux.dev>
Mon, 11 Dec 2023 18:53:34 +0000 (13:53 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Thu, 21 Dec 2023 00:26:31 +0000 (19:26 -0500)
Cutting down on sched.h dependencies: this is going to be used in
workqueue_types.h in the next patch, so we can kill the sched.h
dependency on workqueue.h.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
include/linux/timer.h
include/linux/timer_types.h [new file with mode: 0644]

index 26a545bb0153c031e2253efd7d88177f6fb883f4..f18a2f1eb79e275525967b066e91082a75dc2e59 100644 (file)
@@ -7,21 +7,7 @@
 #include <linux/stddef.h>
 #include <linux/debugobjects.h>
 #include <linux/stringify.h>
-
-struct timer_list {
-       /*
-        * All fields that change during normal runtime grouped to the
-        * same cacheline
-        */
-       struct hlist_node       entry;
-       unsigned long           expires;
-       void                    (*function)(struct timer_list *);
-       u32                     flags;
-
-#ifdef CONFIG_LOCKDEP
-       struct lockdep_map      lockdep_map;
-#endif
-};
+#include <linux/timer_types.h>
 
 #ifdef CONFIG_LOCKDEP
 /*
diff --git a/include/linux/timer_types.h b/include/linux/timer_types.h
new file mode 100644 (file)
index 0000000..fae5a38
--- /dev/null
@@ -0,0 +1,23 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _LINUX_TIMER_TYPES_H
+#define _LINUX_TIMER_TYPES_H
+
+#include <linux/lockdep_types.h>
+#include <linux/types.h>
+
+struct timer_list {
+       /*
+        * All fields that change during normal runtime grouped to the
+        * same cacheline
+        */
+       struct hlist_node       entry;
+       unsigned long           expires;
+       void                    (*function)(struct timer_list *);
+       u32                     flags;
+
+#ifdef CONFIG_LOCKDEP
+       struct lockdep_map      lockdep_map;
+#endif
+};
+
+#endif /* _LINUX_TIMER_TYPES_H */