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> |
