OSDN Git Service

percpu_ref: Replace kernel.h with the necessary inclusions
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 9 Dec 2021 12:30:33 +0000 (14:30 +0200)
committerDennis Zhou <dennis@kernel.org>
Thu, 9 Dec 2021 20:41:09 +0000 (15:41 -0500)
When kernel.h is used in the headers it adds a lot into dependency hell,
especially when there are circular dependencies are involved.

Replace kernel.h inclusion with the list of what is really being used.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Dennis Zhou <dennis@kernel.org>
include/linux/percpu-refcount.h

index b31d3f3..d73a1c0 100644 (file)
@@ -51,9 +51,9 @@
 #define _LINUX_PERCPU_REFCOUNT_H
 
 #include <linux/atomic.h>
-#include <linux/kernel.h>
 #include <linux/percpu.h>
 #include <linux/rcupdate.h>
+#include <linux/types.h>
 #include <linux/gfp.h>
 
 struct percpu_ref;