Skip to content

Commit 8bc3bcc

Browse files
author
Paul Gortmaker
committed
lib: reduce the use of module.h wherever possible
For files only using THIS_MODULE and/or EXPORT_SYMBOL, map them onto including export.h -- or if the file isn't even using those, then just delete the include. Fix up any implicit include dependencies that were being masked by module.h along the way. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
1 parent 630d9c4 commit 8bc3bcc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+74
-63
lines changed

lib/argv_split.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <linux/ctype.h>
77
#include <linux/string.h>
88
#include <linux/slab.h>
9-
#include <linux/module.h>
9+
#include <linux/export.h>
1010

1111
static const char *skip_arg(const char *cp)
1212
{

lib/atomic64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include <linux/cache.h>
1414
#include <linux/spinlock.h>
1515
#include <linux/init.h>
16-
#include <linux/module.h>
16+
#include <linux/export.h>
1717
#include <linux/atomic.h>
1818

1919
/*

lib/average.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
* Version 2. See the file COPYING for more details.
66
*/
77

8-
#include <linux/module.h>
8+
#include <linux/export.h>
99
#include <linux/average.h>
10+
#include <linux/kernel.h>
1011
#include <linux/bug.h>
1112
#include <linux/log2.h>
1213

lib/bcd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <linux/bcd.h>
2-
#include <linux/module.h>
2+
#include <linux/export.h>
33

44
unsigned bcd2bin(unsigned char val)
55
{

lib/bitmap.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
* This source code is licensed under the GNU General Public License,
66
* Version 2. See the file COPYING for more details.
77
*/
8-
#include <linux/module.h>
8+
#include <linux/export.h>
9+
#include <linux/thread_info.h>
910
#include <linux/ctype.h>
1011
#include <linux/errno.h>
1112
#include <linux/bitmap.h>

lib/bsearch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* published by the Free Software Foundation; version 2.
1010
*/
1111

12-
#include <linux/module.h>
12+
#include <linux/export.h>
1313
#include <linux/bsearch.h>
1414

1515
/*

lib/check_signature.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <linux/io.h>
2-
#include <linux/module.h>
2+
#include <linux/export.h>
33

44
/**
55
* check_signature - find BIOS signatures

lib/checksum.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
/* Revised by Kenneth Albanowski for m68knommu. Basic problem: unaligned access
3333
kills, so most of the assembly has to go. */
3434

35-
#include <linux/module.h>
35+
#include <linux/export.h>
3636
#include <net/checksum.h>
3737

3838
#include <asm/byteorder.h>

lib/cmdline.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*
1313
*/
1414

15-
#include <linux/module.h>
15+
#include <linux/export.h>
1616
#include <linux/kernel.h>
1717
#include <linux/string.h>
1818

lib/cpu_rmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#ifdef CONFIG_GENERIC_HARDIRQS
1212
#include <linux/interrupt.h>
1313
#endif
14-
#include <linux/module.h>
14+
#include <linux/export.h>
1515

1616
/*
1717
* These functions maintain a mapping from CPUs to some ordered set of

0 commit comments

Comments
 (0)