Skip to content

Commit

Permalink
include/linux/delay.h: replace kernel.h with the necessary inclusions
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andy Shevchenko authored and Linus Torvalds committed Nov 9, 2021
1 parent 28b2e8f commit 5f6286a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions arch/riscv/lib/delay.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down
4 changes: 4 additions & 0 deletions arch/s390/include/asm/facility.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions drivers/media/dvb-frontends/cxd2880/cxd2880_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion include/linux/delay.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions include/linux/fwnode.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#include <linux/types.h>
#include <linux/list.h>
#include <linux/bits.h>
#include <linux/err.h>

struct fwnode_operations;
Expand Down

0 comments on commit 5f6286a

Please sign in to comment.