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
......@@ -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)
{
......
......@@ -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>
/*
......
......@@ -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>
......
#include <linux/bcd.h>
#include <linux/module.h>
#include <linux/export.h>
unsigned bcd2bin(unsigned char val)
{
......
......@@ -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>
......
......@@ -9,7 +9,7 @@
* published by the Free Software Foundation; version 2.
*/
#include <linux/module.h>
#include <linux/export.h>
#include <linux/bsearch.h>
/*
......
#include <linux/io.h>
#include <linux/module.h>
#include <linux/export.h>
/**
* check_signature - find BIOS signatures
......
......@@ -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>
......
......@@ -12,7 +12,7 @@
*
*/
#include <linux/module.h>
#include <linux/export.h>
#include <linux/kernel.h>
#include <linux/string.h>
......
......@@ -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
......
......@@ -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)
......
......@@ -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 */
......
......@@ -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>
......
#include <linux/module.h>
#include <linux/export.h>
#include <linux/spinlock.h>
#include <linux/atomic.h>
......
#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)
{
......
......@@ -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 */
......
......@@ -4,7 +4,7 @@
*/
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/export.h>
void dump_stack(void)
{
......
......@@ -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>
......
......@@ -11,7 +11,7 @@
*/
#include <linux/bitops.h>
#include <linux/module.h>
#include <linux/export.h>
#include <asm/types.h>
#include <asm/byteorder.h>
......
......@@ -10,7 +10,7 @@
*/
#include <linux/bitops.h>
#include <linux/module.h>
#include <linux/export.h>
#include <asm/types.h>
#include <asm/byteorder.h>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment