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>
This commit is contained in:
Paul Gortmaker
2011-11-16 21:29:17 -05:00
parent 630d9c4727
commit 8bc3bcc93a
63 changed files with 74 additions and 63 deletions

View File

@@ -6,7 +6,7 @@
#include <linux/ctype.h>
#include <linux/string.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/export.h>
static const char *skip_arg(const char *cp)
{

View File

@@ -13,7 +13,7 @@
#include <linux/cache.h>
#include <linux/spinlock.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/atomic.h>
/*

View File

@@ -5,8 +5,9 @@
* Version 2. See the file COPYING for more details.
*/
#include <linux/module.h>
#include <linux/export.h>
#include <linux/average.h>
#include <linux/kernel.h>
#include <linux/bug.h>
#include <linux/log2.h>

View File

@@ -1,5 +1,5 @@
#include <linux/bcd.h>
#include <linux/module.h>
#include <linux/export.h>
unsigned bcd2bin(unsigned char val)
{

View File

@@ -5,7 +5,8 @@
* This source code is licensed under the GNU General Public License,
* 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/errno.h>
#include <linux/bitmap.h>

View File

@@ -9,7 +9,7 @@
* published by the Free Software Foundation; version 2.
*/
#include <linux/module.h>
#include <linux/export.h>
#include <linux/bsearch.h>
/*

View File

@@ -1,5 +1,5 @@
#include <linux/io.h>
#include <linux/module.h>
#include <linux/export.h>
/**
* check_signature - find BIOS signatures

View File

@@ -32,7 +32,7 @@
/* Revised by Kenneth Albanowski for m68knommu. Basic problem: unaligned access
kills, so most of the assembly has to go. */
#include <linux/module.h>
#include <linux/export.h>
#include <net/checksum.h>
#include <asm/byteorder.h>

View File

@@ -12,7 +12,7 @@
*
*/
#include <linux/module.h>
#include <linux/export.h>
#include <linux/kernel.h>
#include <linux/string.h>

View File

@@ -11,7 +11,7 @@
#ifdef CONFIG_GENERIC_HARDIRQS
#include <linux/interrupt.h>
#endif
#include <linux/module.h>
#include <linux/export.h>
/*
* These functions maintain a mapping from CPUs to some ordered set of

View File

@@ -2,7 +2,7 @@
#include <linux/kernel.h>
#include <linux/bitops.h>
#include <linux/cpumask.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/bootmem.h>
int __first_cpu(const cpumask_t *srcp)

View File

@@ -5,7 +5,8 @@
*/
#include <linux/ctype.h>
#include <linux/module.h>
#include <linux/compiler.h>
#include <linux/export.h>
const unsigned char _ctype[] = {
_C,_C,_C,_C,_C,_C,_C,_C, /* 0-7 */

View File

@@ -10,7 +10,7 @@
*/
#include <linux/rwsem.h>
#include <linux/mutex.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/spinlock.h>
#include <linux/debug_locks.h>

View File

@@ -1,4 +1,4 @@
#include <linux/module.h>
#include <linux/export.h>
#include <linux/spinlock.h>
#include <linux/atomic.h>

View File

@@ -1,7 +1,7 @@
#include <linux/pci.h>
#include <linux/io.h>
#include <linux/gfp.h>
#include <linux/module.h>
#include <linux/export.h>
void devm_ioremap_release(struct device *dev, void *res)
{

View File

@@ -16,7 +16,8 @@
* 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>
/* Not needed on 64bit architectures */

View File

@@ -4,7 +4,7 @@
*/
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/export.h>
void dump_stack(void)
{

View File

@@ -5,7 +5,7 @@
#include <linux/stat.h>
#include <linux/types.h>
#include <linux/fs.h>
#include <linux/module.h>
#include <linux/export.h>
#include <linux/interrupt.h>
#include <linux/stacktrace.h>
#include <linux/fault-inject.h>

View File

@@ -11,7 +11,7 @@
*/
#include <linux/bitops.h>
#include <linux/module.h>
#include <linux/export.h>
#include <asm/types.h>
#include <asm/byteorder.h>

View File

@@ -10,7 +10,7 @@
*/
#include <linux/bitops.h>
#include <linux/module.h>
#include <linux/export.h>
#include <asm/types.h>
#include <asm/byteorder.h>

Some files were not shown because too many files have changed in this diff Show More