diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2011-11-16 21:29:17 -0500 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2012-03-07 15:04:04 -0500 |
commit | 8bc3bcc93a2b4e47d5d410146f6546bca6171663 (patch) | |
tree | 101f55a96f751749041c90c32ef1ba89f94dc4d1 /lib | |
parent | 630d9c47274aa89bfa77fe6556d7818bdcb12992 (diff) |
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>
Diffstat (limited to 'lib')
63 files changed, 74 insertions, 63 deletions
diff --git a/lib/argv_split.c b/lib/argv_split.c index 4b1b083f219c..1e9a6cbc3689 100644 --- a/lib/argv_split.c +++ b/lib/argv_split.c | |||
@@ -6,7 +6,7 @@ | |||
6 | #include <linux/ctype.h> | 6 | #include <linux/ctype.h> |
7 | #include <linux/string.h> | 7 | #include <linux/string.h> |
8 | #include <linux/slab.h> | 8 | #include <linux/slab.h> |
9 | #include <linux/module.h> | 9 | #include <linux/export.h> |
10 | 10 | ||
11 | static const char *skip_arg(const char *cp) | 11 | static const char *skip_arg(const char *cp) |
12 | { | 12 | { |
diff --git a/lib/atomic64.c b/lib/atomic64.c index 3975470caf4f..978537809d84 100644 --- a/lib/atomic64.c +++ b/lib/atomic64.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <linux/cache.h> | 13 | #include <linux/cache.h> |
14 | #include <linux/spinlock.h> | 14 | #include <linux/spinlock.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/module.h> | 16 | #include <linux/export.h> |
17 | #include <linux/atomic.h> | 17 | #include <linux/atomic.h> |
18 | 18 | ||
19 | /* | 19 | /* |
diff --git a/lib/average.c b/lib/average.c index 5576c2841496..99a67e662b3c 100644 --- a/lib/average.c +++ b/lib/average.c | |||
@@ -5,8 +5,9 @@ | |||
5 | * Version 2. See the file COPYING for more details. | 5 | * Version 2. See the file COPYING for more details. |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/module.h> | 8 | #include <linux/export.h> |
9 | #include <linux/average.h> | 9 | #include <linux/average.h> |
10 | #include <linux/kernel.h> | ||
10 | #include <linux/bug.h> | 11 | #include <linux/bug.h> |
11 | #include <linux/log2.h> | 12 | #include <linux/log2.h> |
12 | 13 | ||
@@ -1,5 +1,5 @@ | |||
1 | #include <linux/bcd.h> | 1 | #include <linux/bcd.h> |
2 | #include <linux/module.h> | 2 | #include <linux/export.h> |
3 | 3 | ||
4 | unsigned bcd2bin(unsigned char val) | 4 | unsigned bcd2bin(unsigned char val) |
5 | { | 5 | { |
diff --git a/lib/bitmap.c b/lib/bitmap.c index 0d4a127dd9b3..6ce1e3b6a52c 100644 --- a/lib/bitmap.c +++ b/lib/bitmap.c | |||
@@ -5,7 +5,8 @@ | |||
5 | * This source code is licensed under the GNU General Public License, | 5 | * This source code is licensed under the GNU General Public License, |
6 | * Version 2. See the file COPYING for more details. | 6 | * Version 2. See the file COPYING for more details. |
7 | */ | 7 | */ |
8 | #include <linux/module.h> | 8 | #include <linux/export.h> |
9 | #include <linux/thread_info.h> | ||
9 | #include <linux/ctype.h> | 10 | #include <linux/ctype.h> |
10 | #include <linux/errno.h> | 11 | #include <linux/errno.h> |
11 | #include <linux/bitmap.h> | 12 | #include <linux/bitmap.h> |
diff --git a/lib/bsearch.c b/lib/bsearch.c index 5b54758e2afb..e33c179089db 100644 --- a/lib/bsearch.c +++ b/lib/bsearch.c | |||
@@ -9,7 +9,7 @@ | |||
9 | * published by the Free Software Foundation; version 2. | 9 | * published by the Free Software Foundation; version 2. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/module.h> | 12 | #include <linux/export.h> |
13 | #include <linux/bsearch.h> | 13 | #include <linux/bsearch.h> |
14 | 14 | ||
15 | /* | 15 | /* |
diff --git a/lib/check_signature.c b/lib/check_signature.c index fd6af199247b..6b49797980c4 100644 --- a/lib/check_signature.c +++ b/lib/check_signature.c | |||
@@ -1,5 +1,5 @@ | |||
1 | #include <linux/io.h> | 1 | #include <linux/io.h> |
2 | #include <linux/module.h> | 2 | #include <linux/export.h> |
3 | 3 | ||
4 | /** | 4 | /** |
5 | * check_signature - find BIOS signatures | 5 | * check_signature - find BIOS signatures |
diff --git a/lib/checksum.c b/lib/checksum.c index 8df2f91e6d98..12dceb27ff20 100644 --- a/lib/checksum.c +++ b/lib/checksum.c | |||
@@ -32,7 +32,7 @@ | |||
32 | /* Revised by Kenneth Albanowski for m68knommu. Basic problem: unaligned access | 32 | /* Revised by Kenneth Albanowski for m68knommu. Basic problem: unaligned access |
33 | kills, so most of the assembly has to go. */ | 33 | kills, so most of the assembly has to go. */ |
34 | 34 | ||
35 | #include <linux/module.h> | 35 | #include <linux/export.h> |
36 | #include <net/checksum.h> | 36 | #include <net/checksum.h> |
37 | 37 | ||
38 | #include <asm/byteorder.h> | 38 | #include <asm/byteorder.h> |
diff --git a/lib/cmdline.c b/lib/cmdline.c index f5f3ad8b62ff..eb6791188cf5 100644 --- a/lib/cmdline.c +++ b/lib/cmdline.c | |||
@@ -12,7 +12,7 @@ | |||
12 | * | 12 | * |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/module.h> | 15 | #include <linux/export.h> |
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/string.h> | 17 | #include <linux/string.h> |
18 | 18 | ||
diff --git a/lib/cpu_rmap.c b/lib/cpu_rmap.c index 987acfafeb83..145dec5267c9 100644 --- a/lib/cpu_rmap.c +++ b/lib/cpu_rmap.c | |||
@@ -11,7 +11,7 @@ | |||
11 | #ifdef CONFIG_GENERIC_HARDIRQS | 11 | #ifdef CONFIG_GENERIC_HARDIRQS |
12 | #include <linux/interrupt.h> | 12 | #include <linux/interrupt.h> |
13 | #endif | 13 | #endif |
14 | #include <linux/module.h> | 14 | #include <linux/export.h> |
15 | 15 | ||
16 | /* | 16 | /* |
17 | * These functions maintain a mapping from CPUs to some ordered set of | 17 | * These functions maintain a mapping from CPUs to some ordered set of |
diff --git a/lib/cpumask.c b/lib/cpumask.c index af3e5817de98..0b660118ed91 100644 --- a/lib/cpumask.c +++ b/lib/cpumask.c | |||
@@ -2,7 +2,7 @@ | |||
2 | #include <linux/kernel.h> | 2 | #include <linux/kernel.h> |
3 | #include <linux/bitops.h> | 3 | #include <linux/bitops.h> |
4 | #include <linux/cpumask.h> | 4 | #include <linux/cpumask.h> |
5 | #include <linux/module.h> | 5 | #include <linux/export.h> |
6 | #include <linux/bootmem.h> | 6 | #include <linux/bootmem.h> |
7 | 7 | ||
8 | int __first_cpu(const cpumask_t *srcp) | 8 | int __first_cpu(const cpumask_t *srcp) |
diff --git a/lib/ctype.c b/lib/ctype.c index 26baa620e95b..c646df91a2f7 100644 --- a/lib/ctype.c +++ b/lib/ctype.c | |||
@@ -5,7 +5,8 @@ | |||
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/ctype.h> | 7 | #include <linux/ctype.h> |
8 | #include <linux/module.h> | 8 | #include <linux/compiler.h> |
9 | #include <linux/export.h> | ||
9 | 10 | ||
10 | const unsigned char _ctype[] = { | 11 | const unsigned char _ctype[] = { |
11 | _C,_C,_C,_C,_C,_C,_C,_C, /* 0-7 */ | 12 | _C,_C,_C,_C,_C,_C,_C,_C, /* 0-7 */ |
diff --git a/lib/debug_locks.c b/lib/debug_locks.c index b1c177307677..f2fa60c59343 100644 --- a/lib/debug_locks.c +++ b/lib/debug_locks.c | |||
@@ -10,7 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | #include <linux/rwsem.h> | 11 | #include <linux/rwsem.h> |
12 | #include <linux/mutex.h> | 12 | #include <linux/mutex.h> |
13 | #include <linux/module.h> | 13 | #include <linux/export.h> |
14 | #include <linux/spinlock.h> | 14 | #include <linux/spinlock.h> |
15 | #include <linux/debug_locks.h> | 15 | #include <linux/debug_locks.h> |
16 | 16 | ||
diff --git a/lib/dec_and_lock.c b/lib/dec_and_lock.c index b5257725daad..e26278576b31 100644 --- a/lib/dec_and_lock.c +++ b/lib/dec_and_lock.c | |||
@@ -1,4 +1,4 @@ | |||
1 | #include <linux/module.h> | 1 | #include <linux/export.h> |
2 | #include <linux/spinlock.h> | 2 | #include <linux/spinlock.h> |
3 | #include <linux/atomic.h> | 3 | #include <linux/atomic.h> |
4 | 4 | ||
diff --git a/lib/devres.c b/lib/devres.c index 9676617b4486..80b9c76d436a 100644 --- a/lib/devres.c +++ b/lib/devres.c | |||
@@ -1,7 +1,7 @@ | |||
1 | #include <linux/pci.h> | 1 | #include <linux/pci.h> |
2 | #include <linux/io.h> | 2 | #include <linux/io.h> |
3 | #include <linux/gfp.h> | 3 | #include <linux/gfp.h> |
4 | #include <linux/module.h> | 4 | #include <linux/export.h> |
5 | 5 | ||
6 | void devm_ioremap_release(struct device *dev, void *res) | 6 | void devm_ioremap_release(struct device *dev, void *res) |
7 | { | 7 | { |
diff --git a/lib/div64.c b/lib/div64.c index 5b4919191778..3ea24907d52e 100644 --- a/lib/div64.c +++ b/lib/div64.c | |||
@@ -16,7 +16,8 @@ | |||
16 | * assembly versions such as arch/ppc/lib/div64.S and arch/sh/lib/div64.S. | 16 | * assembly versions such as arch/ppc/lib/div64.S and arch/sh/lib/div64.S. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/module.h> | 19 | #include <linux/export.h> |
20 | #include <linux/kernel.h> | ||
20 | #include <linux/math64.h> | 21 | #include <linux/math64.h> |
21 | 22 | ||
22 | /* Not needed on 64bit architectures */ | 23 | /* Not needed on 64bit architectures */ |
diff --git a/lib/dump_stack.c b/lib/dump_stack.c index 53bff4c8452b..42f4f55c9458 100644 --- a/lib/dump_stack.c +++ b/lib/dump_stack.c | |||
@@ -4,7 +4,7 @@ | |||
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
7 | #include <linux/module.h> | 7 | #include <linux/export.h> |
8 | 8 | ||
9 | void dump_stack(void) | 9 | void dump_stack(void) |
10 | { | 10 | { |
diff --git a/lib/fault-inject.c b/lib/fault-inject.c index b4801f51b607..6805453c18e7 100644 --- a/lib/fault-inject.c +++ b/lib/fault-inject.c | |||
@@ -5,7 +5,7 @@ | |||
5 | #include <linux/stat.h> | 5 | #include <linux/stat.h> |
6 | #include <linux/types.h> | 6 | #include <linux/types.h> |
7 | #include <linux/fs.h> | 7 | #include <linux/fs.h> |
8 | #include <linux/module.h> | 8 | #include <linux/export.h> |
9 | #include <linux/interrupt.h> | 9 | #include <linux/interrupt.h> |
10 | #include <linux/stacktrace.h> | 10 | #include <linux/stacktrace.h> |
11 | #include <linux/fault-inject.h> | 11 | #include <linux/fault-inject.h> |
diff --git a/lib/find_last_bit.c b/lib/find_last_bit.c index d903959ad695..91ca09fbf6f9 100644 --- a/lib/find_last_bit.c +++ b/lib/find_last_bit.c | |||
@@ -11,7 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/bitops.h> | 13 | #include <linux/bitops.h> |
14 | #include <linux/module.h> | 14 | #include <linux/export.h> |
15 | #include <asm/types.h> | 15 | #include <asm/types.h> |
16 | #include <asm/byteorder.h> | 16 | #include <asm/byteorder.h> |
17 | 17 | ||
diff --git a/lib/find_next_bit.c b/lib/find_next_bit.c index 4bd75a73ba00..0cbfc0b4398f 100644 --- a/lib/find_next_bit.c +++ b/lib/find_next_bit.c | |||
@@ -10,7 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/bitops.h> | 12 | #include <linux/bitops.h> |
13 | #include <linux/module.h> | 13 | #include <linux/export.h> |
14 | #include <asm/types.h> | 14 | #include <asm/types.h> |
15 | #include <asm/byteorder.h> | 15 | #include <asm/byteorder.h> |
16 | 16 | ||
diff --git a/lib/flex_array.c b/lib/flex_array.c index 9b8b89458c4c..6948a6692fc4 100644 --- a/lib/flex_array.c +++ b/lib/flex_array.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <linux/flex_array.h> | 23 | #include <linux/flex_array.h> |
24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
25 | #include <linux/stddef.h> | 25 | #include <linux/stddef.h> |
26 | #include <linux/module.h> | 26 | #include <linux/export.h> |
27 | #include <linux/reciprocal_div.h> | 27 | #include <linux/reciprocal_div.h> |
28 | 28 | ||
29 | struct flex_array_part { | 29 | struct flex_array_part { |
@@ -1,6 +1,6 @@ | |||
1 | #include <linux/kernel.h> | 1 | #include <linux/kernel.h> |
2 | #include <linux/gcd.h> | 2 | #include <linux/gcd.h> |
3 | #include <linux/module.h> | 3 | #include <linux/export.h> |
4 | 4 | ||
5 | /* Greatest common divisor */ | 5 | /* Greatest common divisor */ |
6 | unsigned long gcd(unsigned long a, unsigned long b) | 6 | unsigned long gcd(unsigned long a, unsigned long b) |
diff --git a/lib/genalloc.c b/lib/genalloc.c index f352cc42f4f8..6bc04aab6ec7 100644 --- a/lib/genalloc.c +++ b/lib/genalloc.c | |||
@@ -29,7 +29,7 @@ | |||
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <linux/slab.h> | 31 | #include <linux/slab.h> |
32 | #include <linux/module.h> | 32 | #include <linux/export.h> |
33 | #include <linux/bitmap.h> | 33 | #include <linux/bitmap.h> |
34 | #include <linux/rculist.h> | 34 | #include <linux/rculist.h> |
35 | #include <linux/interrupt.h> | 35 | #include <linux/interrupt.h> |
diff --git a/lib/halfmd4.c b/lib/halfmd4.c index e11db26f8ae5..66d0ee8b7776 100644 --- a/lib/halfmd4.c +++ b/lib/halfmd4.c | |||
@@ -1,5 +1,5 @@ | |||
1 | #include <linux/kernel.h> | 1 | #include <linux/kernel.h> |
2 | #include <linux/module.h> | 2 | #include <linux/export.h> |
3 | #include <linux/cryptohash.h> | 3 | #include <linux/cryptohash.h> |
4 | 4 | ||
5 | /* F, G and H are basic MD4 functions: selection, majority, parity */ | 5 | /* F, G and H are basic MD4 functions: selection, majority, parity */ |
diff --git a/lib/hexdump.c b/lib/hexdump.c index 51d5ae210244..6540d657dca4 100644 --- a/lib/hexdump.c +++ b/lib/hexdump.c | |||
@@ -10,7 +10,7 @@ | |||
10 | #include <linux/types.h> | 10 | #include <linux/types.h> |
11 | #include <linux/ctype.h> | 11 | #include <linux/ctype.h> |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/module.h> | 13 | #include <linux/export.h> |
14 | 14 | ||
15 | const char hex_asc[] = "0123456789abcdef"; | 15 | const char hex_asc[] = "0123456789abcdef"; |
16 | EXPORT_SYMBOL(hex_asc); | 16 | EXPORT_SYMBOL(hex_asc); |
diff --git a/lib/hweight.c b/lib/hweight.c index 3c79d50814cf..b7d81ba143d1 100644 --- a/lib/hweight.c +++ b/lib/hweight.c | |||
@@ -1,4 +1,4 @@ | |||
1 | #include <linux/module.h> | 1 | #include <linux/export.h> |
2 | #include <linux/bitops.h> | 2 | #include <linux/bitops.h> |
3 | #include <asm/types.h> | 3 | #include <asm/types.h> |
4 | 4 | ||
@@ -29,7 +29,7 @@ | |||
29 | #ifndef TEST // to test in user space... | 29 | #ifndef TEST // to test in user space... |
30 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
31 | #include <linux/init.h> | 31 | #include <linux/init.h> |
32 | #include <linux/module.h> | 32 | #include <linux/export.h> |
33 | #endif | 33 | #endif |
34 | #include <linux/err.h> | 34 | #include <linux/err.h> |
35 | #include <linux/string.h> | 35 | #include <linux/string.h> |
diff --git a/lib/int_sqrt.c b/lib/int_sqrt.c index fd355a99327c..fc2eeb7cb2ea 100644 --- a/lib/int_sqrt.c +++ b/lib/int_sqrt.c | |||
@@ -1,6 +1,6 @@ | |||
1 | 1 | ||
2 | #include <linux/kernel.h> | 2 | #include <linux/kernel.h> |
3 | #include <linux/module.h> | 3 | #include <linux/export.h> |
4 | 4 | ||
5 | /** | 5 | /** |
6 | * int_sqrt - rough approximation to sqrt | 6 | * int_sqrt - rough approximation to sqrt |
diff --git a/lib/iomap.c b/lib/iomap.c index ada922a808e6..2c08f36862eb 100644 --- a/lib/iomap.c +++ b/lib/iomap.c | |||
@@ -6,7 +6,7 @@ | |||
6 | #include <linux/pci.h> | 6 | #include <linux/pci.h> |
7 | #include <linux/io.h> | 7 | #include <linux/io.h> |
8 | 8 | ||
9 | #include <linux/module.h> | 9 | #include <linux/export.h> |
10 | 10 | ||
11 | /* | 11 | /* |
12 | * Read/write from/to an (offsettable) iomem cookie. It might be a PIO | 12 | * Read/write from/to an (offsettable) iomem cookie. It might be a PIO |
diff --git a/lib/iomap_copy.c b/lib/iomap_copy.c index 864fc5ea398c..4527e751b5e0 100644 --- a/lib/iomap_copy.c +++ b/lib/iomap_copy.c | |||
@@ -15,7 +15,7 @@ | |||
15 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. | 15 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/module.h> | 18 | #include <linux/export.h> |
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | 20 | ||
21 | /** | 21 | /** |
diff --git a/lib/iommu-helper.c b/lib/iommu-helper.c index da053313ee5c..ae7d50b05764 100644 --- a/lib/iommu-helper.c +++ b/lib/iommu-helper.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * IOMMU helper functions for the free area management | 2 | * IOMMU helper functions for the free area management |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <linux/module.h> | 5 | #include <linux/export.h> |
6 | #include <linux/bitmap.h> | 6 | #include <linux/bitmap.h> |
7 | 7 | ||
8 | int iommu_is_span_boundary(unsigned int index, unsigned int nr, | 8 | int iommu_is_span_boundary(unsigned int index, unsigned int nr, |
diff --git a/lib/ioremap.c b/lib/ioremap.c index da4e2ad74b68..0c9216c48762 100644 --- a/lib/ioremap.c +++ b/lib/ioremap.c | |||
@@ -9,7 +9,7 @@ | |||
9 | #include <linux/mm.h> | 9 | #include <linux/mm.h> |
10 | #include <linux/sched.h> | 10 | #include <linux/sched.h> |
11 | #include <linux/io.h> | 11 | #include <linux/io.h> |
12 | #include <linux/module.h> | 12 | #include <linux/export.h> |
13 | #include <asm/cacheflush.h> | 13 | #include <asm/cacheflush.h> |
14 | #include <asm/pgtable.h> | 14 | #include <asm/pgtable.h> |
15 | 15 | ||
diff --git a/lib/irq_regs.c b/lib/irq_regs.c index 753880a5440c..9c0a1d70fbe8 100644 --- a/lib/irq_regs.c +++ b/lib/irq_regs.c | |||
@@ -8,7 +8,8 @@ | |||
8 | * as published by the Free Software Foundation; either version | 8 | * as published by the Free Software Foundation; either version |
9 | * 2 of the License, or (at your option) any later version. | 9 | * 2 of the License, or (at your option) any later version. |
10 | */ | 10 | */ |
11 | #include <linux/module.h> | 11 | #include <linux/export.h> |
12 | #include <linux/percpu.h> | ||
12 | #include <asm/irq_regs.h> | 13 | #include <asm/irq_regs.h> |
13 | 14 | ||
14 | #ifndef ARCH_HAS_OWN_IRQ_REGS | 15 | #ifndef ARCH_HAS_OWN_IRQ_REGS |
diff --git a/lib/kasprintf.c b/lib/kasprintf.c index 9c4233b23783..ae0de80c1c88 100644 --- a/lib/kasprintf.c +++ b/lib/kasprintf.c | |||
@@ -5,7 +5,7 @@ | |||
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <stdarg.h> | 7 | #include <stdarg.h> |
8 | #include <linux/module.h> | 8 | #include <linux/export.h> |
9 | #include <linux/slab.h> | 9 | #include <linux/slab.h> |
10 | #include <linux/types.h> | 10 | #include <linux/types.h> |
11 | #include <linux/string.h> | 11 | #include <linux/string.h> |
diff --git a/lib/klist.c b/lib/klist.c index 573d6068a42e..0874e41609a6 100644 --- a/lib/klist.c +++ b/lib/klist.c | |||
@@ -35,7 +35,7 @@ | |||
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include <linux/klist.h> | 37 | #include <linux/klist.h> |
38 | #include <linux/module.h> | 38 | #include <linux/export.h> |
39 | #include <linux/sched.h> | 39 | #include <linux/sched.h> |
40 | 40 | ||
41 | /* | 41 | /* |
diff --git a/lib/kobject.c b/lib/kobject.c index c33d7a18d635..21dee7c19afd 100644 --- a/lib/kobject.c +++ b/lib/kobject.c | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | #include <linux/kobject.h> | 15 | #include <linux/kobject.h> |
16 | #include <linux/string.h> | 16 | #include <linux/string.h> |
17 | #include <linux/module.h> | 17 | #include <linux/export.h> |
18 | #include <linux/stat.h> | 18 | #include <linux/stat.h> |
19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
20 | 20 | ||
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c index e66e9b632617..6baabebda11a 100644 --- a/lib/kobject_uevent.c +++ b/lib/kobject_uevent.c | |||
@@ -17,7 +17,8 @@ | |||
17 | #include <linux/spinlock.h> | 17 | #include <linux/spinlock.h> |
18 | #include <linux/string.h> | 18 | #include <linux/string.h> |
19 | #include <linux/kobject.h> | 19 | #include <linux/kobject.h> |
20 | #include <linux/module.h> | 20 | #include <linux/export.h> |
21 | #include <linux/kmod.h> | ||
21 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
22 | #include <linux/user_namespace.h> | 23 | #include <linux/user_namespace.h> |
23 | #include <linux/socket.h> | 24 | #include <linux/socket.h> |
diff --git a/lib/kstrtox.c b/lib/kstrtox.c index b1dd3e7d88cb..c3615eab0cc3 100644 --- a/lib/kstrtox.c +++ b/lib/kstrtox.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/math64.h> | 17 | #include <linux/math64.h> |
18 | #include <linux/module.h> | 18 | #include <linux/export.h> |
19 | #include <linux/types.h> | 19 | #include <linux/types.h> |
20 | #include <asm/uaccess.h> | 20 | #include <asm/uaccess.h> |
21 | #include "kstrtox.h" | 21 | #include "kstrtox.h" |
@@ -1,6 +1,6 @@ | |||
1 | #include <linux/kernel.h> | 1 | #include <linux/kernel.h> |
2 | #include <linux/gcd.h> | 2 | #include <linux/gcd.h> |
3 | #include <linux/module.h> | 3 | #include <linux/export.h> |
4 | #include <linux/lcm.h> | 4 | #include <linux/lcm.h> |
5 | 5 | ||
6 | /* Lowest common multiple */ | 6 | /* Lowest common multiple */ |
diff --git a/lib/list_debug.c b/lib/list_debug.c index b8029a5583ff..c7a1f0b6a78a 100644 --- a/lib/list_debug.c +++ b/lib/list_debug.c | |||
@@ -6,8 +6,9 @@ | |||
6 | * DEBUG_LIST. | 6 | * DEBUG_LIST. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/module.h> | 9 | #include <linux/export.h> |
10 | #include <linux/list.h> | 10 | #include <linux/list.h> |
11 | #include <linux/kernel.h> | ||
11 | 12 | ||
12 | /* | 13 | /* |
13 | * Insert a new entry between two known consecutive entries. | 14 | * Insert a new entry between two known consecutive entries. |
diff --git a/lib/llist.c b/lib/llist.c index 700cff77a387..8221b3d2fbf0 100644 --- a/lib/llist.c +++ b/lib/llist.c | |||
@@ -23,7 +23,7 @@ | |||
23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
24 | */ | 24 | */ |
25 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
26 | #include <linux/module.h> | 26 | #include <linux/export.h> |
27 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
28 | #include <linux/llist.h> | 28 | #include <linux/llist.h> |
29 | 29 | ||
diff --git a/lib/locking-selftest.c b/lib/locking-selftest.c index 507a22fab738..7aae0f2a5e0a 100644 --- a/lib/locking-selftest.c +++ b/lib/locking-selftest.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #include <linux/mutex.h> | 14 | #include <linux/mutex.h> |
15 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
16 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
17 | #include <linux/module.h> | ||
18 | #include <linux/lockdep.h> | 17 | #include <linux/lockdep.h> |
19 | #include <linux/spinlock.h> | 18 | #include <linux/spinlock.h> |
20 | #include <linux/kallsyms.h> | 19 | #include <linux/kallsyms.h> |
@@ -1,5 +1,5 @@ | |||
1 | #include <linux/kernel.h> | 1 | #include <linux/kernel.h> |
2 | #include <linux/module.h> | 2 | #include <linux/export.h> |
3 | #include <linux/cryptohash.h> | 3 | #include <linux/cryptohash.h> |
4 | 4 | ||
5 | #define F1(x, y, z) (z ^ (x & (y ^ z))) | 5 | #define F1(x, y, z) (z ^ (x & (y ^ z))) |
diff --git a/lib/nlattr.c b/lib/nlattr.c index a8408b6cacdf..4226dfeb5178 100644 --- a/lib/nlattr.c +++ b/lib/nlattr.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> | 5 | * Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/module.h> | 8 | #include <linux/export.h> |
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
11 | #include <linux/jiffies.h> | 11 | #include <linux/jiffies.h> |
diff --git a/lib/parser.c b/lib/parser.c index dcbaaef6cf11..c43410084838 100644 --- a/lib/parser.c +++ b/lib/parser.c | |||
@@ -6,7 +6,8 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/ctype.h> | 8 | #include <linux/ctype.h> |
9 | #include <linux/module.h> | 9 | #include <linux/types.h> |
10 | #include <linux/export.h> | ||
10 | #include <linux/parser.h> | 11 | #include <linux/parser.h> |
11 | #include <linux/slab.h> | 12 | #include <linux/slab.h> |
12 | #include <linux/string.h> | 13 | #include <linux/string.h> |
diff --git a/lib/radix-tree.c b/lib/radix-tree.c index dc63d0818394..3e69c2b66c94 100644 --- a/lib/radix-tree.c +++ b/lib/radix-tree.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #include <linux/errno.h> | 22 | #include <linux/errno.h> |
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/module.h> | 25 | #include <linux/export.h> |
26 | #include <linux/radix-tree.h> | 26 | #include <linux/radix-tree.h> |
27 | #include <linux/percpu.h> | 27 | #include <linux/percpu.h> |
28 | #include <linux/slab.h> | 28 | #include <linux/slab.h> |
diff --git a/lib/random32.c b/lib/random32.c index fc3545a32771..938bde5876ac 100644 --- a/lib/random32.c +++ b/lib/random32.c | |||
@@ -35,7 +35,7 @@ | |||
35 | 35 | ||
36 | #include <linux/types.h> | 36 | #include <linux/types.h> |
37 | #include <linux/percpu.h> | 37 | #include <linux/percpu.h> |
38 | #include <linux/module.h> | 38 | #include <linux/export.h> |
39 | #include <linux/jiffies.h> | 39 | #include <linux/jiffies.h> |
40 | #include <linux/random.h> | 40 | #include <linux/random.h> |
41 | 41 | ||
diff --git a/lib/ratelimit.c b/lib/ratelimit.c index c96d500577de..40e03ea2a967 100644 --- a/lib/ratelimit.c +++ b/lib/ratelimit.c | |||
@@ -11,7 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/ratelimit.h> | 12 | #include <linux/ratelimit.h> |
13 | #include <linux/jiffies.h> | 13 | #include <linux/jiffies.h> |
14 | #include <linux/module.h> | 14 | #include <linux/export.h> |
15 | 15 | ||
16 | /* | 16 | /* |
17 | * __ratelimit - rate limiting | 17 | * __ratelimit - rate limiting |
diff --git a/lib/rational.c b/lib/rational.c index 3ed247b80662..d326da3976f5 100644 --- a/lib/rational.c +++ b/lib/rational.c | |||
@@ -7,7 +7,8 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/rational.h> | 9 | #include <linux/rational.h> |
10 | #include <linux/module.h> | 10 | #include <linux/compiler.h> |
11 | #include <linux/export.h> | ||
11 | 12 | ||
12 | /* | 13 | /* |
13 | * calculate best rational approximation for a given fraction | 14 | * calculate best rational approximation for a given fraction |
diff --git a/lib/rbtree.c b/lib/rbtree.c index a16be19a1305..d4175565dc2c 100644 --- a/lib/rbtree.c +++ b/lib/rbtree.c | |||
@@ -21,7 +21,7 @@ | |||
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/rbtree.h> | 23 | #include <linux/rbtree.h> |
24 | #include <linux/module.h> | 24 | #include <linux/export.h> |
25 | 25 | ||
26 | static void __rb_rotate_left(struct rb_node *node, struct rb_root *root) | 26 | static void __rb_rotate_left(struct rb_node *node, struct rb_root *root) |
27 | { | 27 | { |
diff --git a/lib/rwsem-spinlock.c b/lib/rwsem-spinlock.c index f2393c21fe85..7e0d6a58fc83 100644 --- a/lib/rwsem-spinlock.c +++ b/lib/rwsem-spinlock.c | |||
@@ -7,7 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | #include <linux/rwsem.h> | 8 | #include <linux/rwsem.h> |
9 | #include <linux/sched.h> | 9 | #include <linux/sched.h> |
10 | #include <linux/module.h> | 10 | #include <linux/export.h> |
11 | 11 | ||
12 | struct rwsem_waiter { | 12 | struct rwsem_waiter { |
13 | struct list_head list; | 13 | struct list_head list; |
diff --git a/lib/rwsem.c b/lib/rwsem.c index 410aa1189b13..8337e1b9bb8d 100644 --- a/lib/rwsem.c +++ b/lib/rwsem.c | |||
@@ -6,7 +6,7 @@ | |||
6 | #include <linux/rwsem.h> | 6 | #include <linux/rwsem.h> |
7 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
8 | #include <linux/init.h> | 8 | #include <linux/init.h> |
9 | #include <linux/module.h> | 9 | #include <linux/export.h> |
10 | 10 | ||
11 | /* | 11 | /* |
12 | * Initialize an rwsem: | 12 | * Initialize an rwsem: |
diff --git a/lib/scatterlist.c b/lib/scatterlist.c index 4ceb05d772ae..63a7f2ebbd01 100644 --- a/lib/scatterlist.c +++ b/lib/scatterlist.c | |||
@@ -6,7 +6,7 @@ | |||
6 | * This source code is licensed under the GNU General Public License, | 6 | * This source code is licensed under the GNU General Public License, |
7 | * Version 2. See the file COPYING for more details. | 7 | * Version 2. See the file COPYING for more details. |
8 | */ | 8 | */ |
9 | #include <linux/module.h> | 9 | #include <linux/export.h> |
10 | #include <linux/slab.h> | 10 | #include <linux/slab.h> |
11 | #include <linux/scatterlist.h> | 11 | #include <linux/scatterlist.h> |
12 | #include <linux/highmem.h> | 12 | #include <linux/highmem.h> |
diff --git a/lib/sha1.c b/lib/sha1.c index 1de509a159c8..1df191e04a24 100644 --- a/lib/sha1.c +++ b/lib/sha1.c | |||
@@ -6,7 +6,7 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
9 | #include <linux/module.h> | 9 | #include <linux/export.h> |
10 | #include <linux/bitops.h> | 10 | #include <linux/bitops.h> |
11 | #include <linux/cryptohash.h> | 11 | #include <linux/cryptohash.h> |
12 | #include <asm/unaligned.h> | 12 | #include <asm/unaligned.h> |
diff --git a/lib/smp_processor_id.c b/lib/smp_processor_id.c index 503f087382a4..4c0d0e51d49e 100644 --- a/lib/smp_processor_id.c +++ b/lib/smp_processor_id.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * DEBUG_PREEMPT variant of smp_processor_id(). | 4 | * DEBUG_PREEMPT variant of smp_processor_id(). |
5 | */ | 5 | */ |
6 | #include <linux/module.h> | 6 | #include <linux/export.h> |
7 | #include <linux/kallsyms.h> | 7 | #include <linux/kallsyms.h> |
8 | #include <linux/sched.h> | 8 | #include <linux/sched.h> |
9 | 9 | ||
diff --git a/lib/spinlock_debug.c b/lib/spinlock_debug.c index 5f3eacdd6178..525d160d44f0 100644 --- a/lib/spinlock_debug.c +++ b/lib/spinlock_debug.c | |||
@@ -11,7 +11,7 @@ | |||
11 | #include <linux/interrupt.h> | 11 | #include <linux/interrupt.h> |
12 | #include <linux/debug_locks.h> | 12 | #include <linux/debug_locks.h> |
13 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
14 | #include <linux/module.h> | 14 | #include <linux/export.h> |
15 | 15 | ||
16 | void __raw_spin_lock_init(raw_spinlock_t *lock, const char *name, | 16 | void __raw_spin_lock_init(raw_spinlock_t *lock, const char *name, |
17 | struct lock_class_key *key) | 17 | struct lock_class_key *key) |
diff --git a/lib/string.c b/lib/string.c index dc4a86341f91..26df13e43ccd 100644 --- a/lib/string.c +++ b/lib/string.c | |||
@@ -22,7 +22,10 @@ | |||
22 | #include <linux/types.h> | 22 | #include <linux/types.h> |
23 | #include <linux/string.h> | 23 | #include <linux/string.h> |
24 | #include <linux/ctype.h> | 24 | #include <linux/ctype.h> |
25 | #include <linux/module.h> | 25 | #include <linux/kernel.h> |
26 | #include <linux/export.h> | ||
27 | #include <linux/bug.h> | ||
28 | #include <linux/errno.h> | ||
26 | 29 | ||
27 | #ifndef __HAVE_ARCH_STRNICMP | 30 | #ifndef __HAVE_ARCH_STRNICMP |
28 | /** | 31 | /** |
diff --git a/lib/string_helpers.c b/lib/string_helpers.c index ab431d4cc970..dd4ece372699 100644 --- a/lib/string_helpers.c +++ b/lib/string_helpers.c | |||
@@ -5,7 +5,7 @@ | |||
5 | */ | 5 | */ |
6 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
7 | #include <linux/math64.h> | 7 | #include <linux/math64.h> |
8 | #include <linux/module.h> | 8 | #include <linux/export.h> |
9 | #include <linux/string_helpers.h> | 9 | #include <linux/string_helpers.h> |
10 | 10 | ||
11 | /** | 11 | /** |
diff --git a/lib/swiotlb.c b/lib/swiotlb.c index 058935ef3975..9c6c9379da0a 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/cache.h> | 20 | #include <linux/cache.h> |
21 | #include <linux/dma-mapping.h> | 21 | #include <linux/dma-mapping.h> |
22 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
23 | #include <linux/module.h> | 23 | #include <linux/export.h> |
24 | #include <linux/spinlock.h> | 24 | #include <linux/spinlock.h> |
25 | #include <linux/string.h> | 25 | #include <linux/string.h> |
26 | #include <linux/swiotlb.h> | 26 | #include <linux/swiotlb.h> |
diff --git a/lib/syscall.c b/lib/syscall.c index a4f7067f72fa..58710eefeac8 100644 --- a/lib/syscall.c +++ b/lib/syscall.c | |||
@@ -1,6 +1,6 @@ | |||
1 | #include <linux/ptrace.h> | 1 | #include <linux/ptrace.h> |
2 | #include <linux/sched.h> | 2 | #include <linux/sched.h> |
3 | #include <linux/module.h> | 3 | #include <linux/export.h> |
4 | #include <asm/syscall.h> | 4 | #include <asm/syscall.h> |
5 | 5 | ||
6 | static int collect_syscall(struct task_struct *target, long *callno, | 6 | static int collect_syscall(struct task_struct *target, long *callno, |
diff --git a/lib/timerqueue.c b/lib/timerqueue.c index 191176a43e9a..93287c60099b 100644 --- a/lib/timerqueue.c +++ b/lib/timerqueue.c | |||
@@ -24,7 +24,7 @@ | |||
24 | 24 | ||
25 | #include <linux/timerqueue.h> | 25 | #include <linux/timerqueue.h> |
26 | #include <linux/rbtree.h> | 26 | #include <linux/rbtree.h> |
27 | #include <linux/module.h> | 27 | #include <linux/export.h> |
28 | 28 | ||
29 | /** | 29 | /** |
30 | * timerqueue_add - Adds timer to timerqueue. | 30 | * timerqueue_add - Adds timer to timerqueue. |
diff --git a/lib/uuid.c b/lib/uuid.c index 8fadd7cef46c..52a6fe6387de 100644 --- a/lib/uuid.c +++ b/lib/uuid.c | |||
@@ -19,7 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/module.h> | 22 | #include <linux/export.h> |
23 | #include <linux/uuid.h> | 23 | #include <linux/uuid.h> |
24 | #include <linux/random.h> | 24 | #include <linux/random.h> |
25 | 25 | ||
diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 8e75003d62f6..7f29bfce8402 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c | |||
@@ -17,7 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <stdarg.h> | 19 | #include <stdarg.h> |
20 | #include <linux/module.h> | 20 | #include <linux/module.h> /* for KSYM_SYMBOL_LEN */ |
21 | #include <linux/types.h> | 21 | #include <linux/types.h> |
22 | #include <linux/string.h> | 22 | #include <linux/string.h> |
23 | #include <linux/ctype.h> | 23 | #include <linux/ctype.h> |