]> git.baikalelectronics.ru Git - kernel.git/commitdiff
include/linux/delay.h: replace kernel.h with the necessary inclusions
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 9 Nov 2021 02:32:32 +0000 (18:32 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 9 Nov 2021 18:02:49 +0000 (10:02 -0800)
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.

[akpm@linux-foundation.org: cxd2880_common.h needs bits.h for GENMASK()]
[andriy.shevchenko@linux.intel.com: delay.h: fix for removed kernel.h]
Link: https://lkml.kernel.org/r/20211028170143.56523-1-andriy.shevchenko@linux.intel.com
[akpm@linux-foundation.org: include/linux/fwnode.h needs bits.h for BIT()]

Link: https://lkml.kernel.org/r/20211027150324.79827-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/riscv/lib/delay.c
arch/s390/include/asm/facility.h
drivers/media/dvb-frontends/cxd2880/cxd2880_common.h
include/linux/delay.h
include/linux/fwnode.h

index f51c9a03bca1e7ca4c71faecba4c2e4b5f9e0d65..49d510ba75fdfb29c30c98a1d5eb02df5fe207de 100644 (file)
@@ -4,10 +4,14 @@
  */
 
 #include <linux/delay.h>
+#include <linux/math.h>
 #include <linux/param.h>
 #include <linux/timex.h>
+#include <linux/types.h>
 #include <linux/export.h>
 
+#include <asm/processor.h>
+
 /*
  * This is copies from arch/arm/include/asm/delay.h
  *
index e3aa354ab9f461176a3e271785b14814ec5f2c8b..94b6919026dfb8d75d74ca8c9d3aa52f80fc72e1 100644 (file)
@@ -9,8 +9,12 @@
 #define __ASM_FACILITY_H
 
 #include <asm/facility-defs.h>
+
+#include <linux/minmax.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <linux/preempt.h>
+
 #include <asm/lowcore.h>
 
 #define MAX_FACILITY_BIT (sizeof(stfle_fac_list) * 8)
index b05bce71ab3532d5ba1877570b5448b7213efad8..9dc15a5a96835054be41877d71194cb81605d1a2 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/delay.h>
+#include <linux/bits.h>
 #include <linux/string.h>
 
 int cxd2880_convert2s_complement(u32 value, u32 bitlen);
index 1d0e2ce6b6d9f1ff4fa9461cb2b00d40d92fd7c2..8eacf67eb212e26fe71da59777df190d48929d6d 100644 (file)
@@ -19,7 +19,7 @@
  *   https://lists.openwall.net/linux-kernel/2011/01/09/56
  */
 
-#include <linux/kernel.h>
+#include <linux/math.h>
 
 extern unsigned long loops_per_jiffy;
 
index 9f4ad719bfe3f8b5f49361db3750359bf954dfdc..3a532ba66f6c291a7415ab4cca52a469fcbc6405 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <linux/types.h>
 #include <linux/list.h>
+#include <linux/bits.h>
 #include <linux/err.h>
 
 struct fwnode_operations;