[PATCH 8/8] include: list: replace full kernel.h inclusion with smaller container_of.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



<linux/kernel.h> defines a lot of things that go beyond what's needed for
<linux/list.h>. The only thing actually needed for the list
implementation is <linux/container_of.h>, so include that directly.

This is also what Linux has been doing for a while.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 include/linux/list.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/list.h b/include/linux/list.h
index e47a8188e807..e28f54a0d413 100644
--- a/include/linux/list.h
+++ b/include/linux/list.h
@@ -2,11 +2,11 @@
 #ifndef _LINUX_LIST_H
 #define _LINUX_LIST_H
 
+#include <linux/container_of.h>
 #include <linux/types.h>
 #include <linux/stddef.h>
 #include <linux/poison.h>
 #include <linux/const.h>
-#include <linux/kernel.h>
 
 /*
  * Simple doubly linked list implementation.
-- 
2.39.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux