Skip to content
Snippets Groups Projects
Commit 8bc3bcc9 authored by Paul Gortmaker's avatar Paul Gortmaker
Browse files

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: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent 630d9c47
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#include <linux/ctype.h> #include <linux/ctype.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/module.h> #include <linux/export.h>
static const char *skip_arg(const char *cp) static const char *skip_arg(const char *cp)
{ {
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include <linux/cache.h> #include <linux/cache.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/module.h> #include <linux/export.h>
#include <linux/atomic.h> #include <linux/atomic.h>
/* /*
......
...@@ -5,8 +5,9 @@ ...@@ -5,8 +5,9 @@
* Version 2. See the file COPYING for more details. * Version 2. See the file COPYING for more details.
*/ */
#include <linux/module.h> #include <linux/export.h>
#include <linux/average.h> #include <linux/average.h>
#include <linux/kernel.h>
#include <linux/bug.h> #include <linux/bug.h>
#include <linux/log2.h> #include <linux/log2.h>
......
#include <linux/bcd.h> #include <linux/bcd.h>
#include <linux/module.h> #include <linux/export.h>
unsigned bcd2bin(unsigned char val) unsigned bcd2bin(unsigned char val)
{ {
......
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
* This source code is licensed under the GNU General Public License, * This source code is licensed under the GNU General Public License,
* Version 2. See the file COPYING for more details. * Version 2. See the file COPYING for more details.
*/ */
#include <linux/module.h> #include <linux/export.h>
#include <linux/thread_info.h>
#include <linux/ctype.h> #include <linux/ctype.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/bitmap.h> #include <linux/bitmap.h>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* published by the Free Software Foundation; version 2. * published by the Free Software Foundation; version 2.
*/ */
#include <linux/module.h> #include <linux/export.h>
#include <linux/bsearch.h> #include <linux/bsearch.h>
/* /*
......
#include <linux/io.h> #include <linux/io.h>
#include <linux/module.h> #include <linux/export.h>
/** /**
* check_signature - find BIOS signatures * check_signature - find BIOS signatures
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
/* Revised by Kenneth Albanowski for m68knommu. Basic problem: unaligned access /* Revised by Kenneth Albanowski for m68knommu. Basic problem: unaligned access
kills, so most of the assembly has to go. */ kills, so most of the assembly has to go. */
#include <linux/module.h> #include <linux/export.h>
#include <net/checksum.h> #include <net/checksum.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* *
*/ */
#include <linux/module.h> #include <linux/export.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/string.h> #include <linux/string.h>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#ifdef CONFIG_GENERIC_HARDIRQS #ifdef CONFIG_GENERIC_HARDIRQS
#include <linux/interrupt.h> #include <linux/interrupt.h>
#endif #endif
#include <linux/module.h> #include <linux/export.h>
/* /*
* These functions maintain a mapping from CPUs to some ordered set of * These functions maintain a mapping from CPUs to some ordered set of
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/cpumask.h> #include <linux/cpumask.h>
#include <linux/module.h> #include <linux/export.h>
#include <linux/bootmem.h> #include <linux/bootmem.h>
int __first_cpu(const cpumask_t *srcp) int __first_cpu(const cpumask_t *srcp)
......
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
*/ */
#include <linux/ctype.h> #include <linux/ctype.h>
#include <linux/module.h> #include <linux/compiler.h>
#include <linux/export.h>
const unsigned char _ctype[] = { const unsigned char _ctype[] = {
_C,_C,_C,_C,_C,_C,_C,_C, /* 0-7 */ _C,_C,_C,_C,_C,_C,_C,_C, /* 0-7 */
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
*/ */
#include <linux/rwsem.h> #include <linux/rwsem.h>
#include <linux/mutex.h> #include <linux/mutex.h>
#include <linux/module.h> #include <linux/export.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/debug_locks.h> #include <linux/debug_locks.h>
......
#include <linux/module.h> #include <linux/export.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/atomic.h> #include <linux/atomic.h>
......
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/gfp.h> #include <linux/gfp.h>
#include <linux/module.h> #include <linux/export.h>
void devm_ioremap_release(struct device *dev, void *res) void devm_ioremap_release(struct device *dev, void *res)
{ {
......
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
* assembly versions such as arch/ppc/lib/div64.S and arch/sh/lib/div64.S. * assembly versions such as arch/ppc/lib/div64.S and arch/sh/lib/div64.S.
*/ */
#include <linux/module.h> #include <linux/export.h>
#include <linux/kernel.h>
#include <linux/math64.h> #include <linux/math64.h>
/* Not needed on 64bit architectures */ /* Not needed on 64bit architectures */
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/export.h>
void dump_stack(void) void dump_stack(void)
{ {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#include <linux/stat.h> #include <linux/stat.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/module.h> #include <linux/export.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/stacktrace.h> #include <linux/stacktrace.h>
#include <linux/fault-inject.h> #include <linux/fault-inject.h>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
*/ */
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/module.h> #include <linux/export.h>
#include <asm/types.h> #include <asm/types.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
*/ */
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/module.h> #include <linux/export.h>
#include <asm/types.h> #include <asm/types.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment