diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-06 22:44:47 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-06 22:44:47 -0500 |
| commit | 32aaeffbd4a7457bf2f7448b33b5946ff2a960eb (patch) | |
| tree | faf7ad871d87176423ff9ed1d1ba4d9c688fc23f /include/linux | |
| parent | 208bca0860406d16398145ddd950036a737c3c9d (diff) | |
| parent | 67b84999b1a8b1af5625b1eabe92146c5eb42932 (diff) | |
Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux
* 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
Revert "tracing: Include module.h in define_trace.h"
irq: don't put module.h into irq.h for tracking irqgen modules.
bluetooth: macroize two small inlines to avoid module.h
ip_vs.h: fix implicit use of module_get/module_put from module.h
nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
include: replace linux/module.h with "struct module" wherever possible
include: convert various register fcns to macros to avoid include chaining
crypto.h: remove unused crypto_tfm_alg_modname() inline
uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
pm_runtime.h: explicitly requires notifier.h
linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
miscdevice.h: fix up implicit use of lists and types
stop_machine.h: fix implicit use of smp.h for smp_processor_id
of: fix implicit use of errno.h in include/linux/of.h
of_platform.h: delete needless include <linux/module.h>
acpi: remove module.h include from platform/aclinux.h
miscdevice.h: delete unnecessary inclusion of module.h
device_cgroup.h: delete needless include <linux/module.h>
net: sch_generic remove redundant use of <linux/module.h>
net: inet_timewait_sock doesnt need <linux/module.h>
...
Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in
- drivers/media/dvb/frontends/dibx000_common.c
- drivers/media/video/{mt9m111.c,ov6650.c}
- drivers/mfd/ab3550-core.c
- include/linux/dmaengine.h
Diffstat (limited to 'include/linux')
40 files changed, 197 insertions, 176 deletions
diff --git a/include/linux/bcma/bcma.h b/include/linux/bcma/bcma.h index 5dbd7055cb86..4d4b59de9467 100644 --- a/include/linux/bcma/bcma.h +++ b/include/linux/bcma/bcma.h | |||
| @@ -170,10 +170,9 @@ struct bcma_driver { | |||
| 170 | }; | 170 | }; |
| 171 | extern | 171 | extern |
| 172 | int __bcma_driver_register(struct bcma_driver *drv, struct module *owner); | 172 | int __bcma_driver_register(struct bcma_driver *drv, struct module *owner); |
| 173 | static inline int bcma_driver_register(struct bcma_driver *drv) | 173 | #define bcma_driver_register(drv) \ |
| 174 | { | 174 | __bcma_driver_register(drv, THIS_MODULE) |
| 175 | return __bcma_driver_register(drv, THIS_MODULE); | 175 | |
| 176 | } | ||
| 177 | extern void bcma_driver_unregister(struct bcma_driver *drv); | 176 | extern void bcma_driver_unregister(struct bcma_driver *drv); |
| 178 | 177 | ||
| 179 | struct bcma_bus { | 178 | struct bcma_bus { |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 5267cd2f20dc..c7a6d3b5bc7b 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -14,7 +14,6 @@ | |||
| 14 | #include <linux/wait.h> | 14 | #include <linux/wait.h> |
| 15 | #include <linux/mempool.h> | 15 | #include <linux/mempool.h> |
| 16 | #include <linux/bio.h> | 16 | #include <linux/bio.h> |
| 17 | #include <linux/module.h> | ||
| 18 | #include <linux/stringify.h> | 17 | #include <linux/stringify.h> |
| 19 | #include <linux/gfp.h> | 18 | #include <linux/gfp.h> |
| 20 | #include <linux/bsg.h> | 19 | #include <linux/bsg.h> |
| @@ -22,6 +21,7 @@ | |||
| 22 | 21 | ||
| 23 | #include <asm/scatterlist.h> | 22 | #include <asm/scatterlist.h> |
| 24 | 23 | ||
| 24 | struct module; | ||
| 25 | struct scsi_ioctl_command; | 25 | struct scsi_ioctl_command; |
| 26 | 26 | ||
| 27 | struct request_queue; | 27 | struct request_queue; |
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index b51629e15cfc..583baf22cad2 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h | |||
| @@ -13,7 +13,6 @@ | |||
| 13 | 13 | ||
| 14 | #include <linux/percpu.h> | 14 | #include <linux/percpu.h> |
| 15 | #include <linux/list.h> | 15 | #include <linux/list.h> |
| 16 | #include <linux/module.h> | ||
| 17 | #include <linux/kobject.h> | 16 | #include <linux/kobject.h> |
| 18 | #include <linux/completion.h> | 17 | #include <linux/completion.h> |
| 19 | 18 | ||
| @@ -21,6 +20,8 @@ | |||
| 21 | #define CPUIDLE_NAME_LEN 16 | 20 | #define CPUIDLE_NAME_LEN 16 |
| 22 | #define CPUIDLE_DESC_LEN 32 | 21 | #define CPUIDLE_DESC_LEN 32 |
| 23 | 22 | ||
| 23 | struct module; | ||
| 24 | |||
| 24 | struct cpuidle_device; | 25 | struct cpuidle_device; |
| 25 | 26 | ||
| 26 | 27 | ||
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index de9adec5693c..8a94217b298e 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h | |||
| @@ -18,7 +18,6 @@ | |||
| 18 | #define _LINUX_CRYPTO_H | 18 | #define _LINUX_CRYPTO_H |
| 19 | 19 | ||
| 20 | #include <linux/atomic.h> | 20 | #include <linux/atomic.h> |
| 21 | #include <linux/module.h> | ||
| 22 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
| 23 | #include <linux/list.h> | 22 | #include <linux/list.h> |
| 24 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
| @@ -510,11 +509,6 @@ static inline int crypto_tfm_alg_priority(struct crypto_tfm *tfm) | |||
| 510 | return tfm->__crt_alg->cra_priority; | 509 | return tfm->__crt_alg->cra_priority; |
| 511 | } | 510 | } |
| 512 | 511 | ||
| 513 | static inline const char *crypto_tfm_alg_modname(struct crypto_tfm *tfm) | ||
| 514 | { | ||
| 515 | return module_name(tfm->__crt_alg->cra_module); | ||
| 516 | } | ||
| 517 | |||
| 518 | static inline u32 crypto_tfm_alg_type(struct crypto_tfm *tfm) | 512 | static inline u32 crypto_tfm_alg_type(struct crypto_tfm *tfm) |
| 519 | { | 513 | { |
| 520 | return tfm->__crt_alg->cra_flags & CRYPTO_ALG_TYPE_MASK; | 514 | return tfm->__crt_alg->cra_flags & CRYPTO_ALG_TYPE_MASK; |
diff --git a/include/linux/device.h b/include/linux/device.h index e88abeecfadf..ffbcf95cd97d 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
| @@ -20,7 +20,7 @@ | |||
| 20 | #include <linux/lockdep.h> | 20 | #include <linux/lockdep.h> |
| 21 | #include <linux/compiler.h> | 21 | #include <linux/compiler.h> |
| 22 | #include <linux/types.h> | 22 | #include <linux/types.h> |
| 23 | #include <linux/module.h> | 23 | #include <linux/mutex.h> |
| 24 | #include <linux/pm.h> | 24 | #include <linux/pm.h> |
| 25 | #include <linux/atomic.h> | 25 | #include <linux/atomic.h> |
| 26 | #include <asm/device.h> | 26 | #include <asm/device.h> |
| @@ -29,6 +29,7 @@ struct device; | |||
| 29 | struct device_private; | 29 | struct device_private; |
| 30 | struct device_driver; | 30 | struct device_driver; |
| 31 | struct driver_private; | 31 | struct driver_private; |
| 32 | struct module; | ||
| 32 | struct class; | 33 | struct class; |
| 33 | struct subsys_private; | 34 | struct subsys_private; |
| 34 | struct bus_type; | 35 | struct bus_type; |
| @@ -723,10 +724,14 @@ extern int dev_set_drvdata(struct device *dev, void *data); | |||
| 723 | */ | 724 | */ |
| 724 | extern struct device *__root_device_register(const char *name, | 725 | extern struct device *__root_device_register(const char *name, |
| 725 | struct module *owner); | 726 | struct module *owner); |
| 726 | static inline struct device *root_device_register(const char *name) | 727 | |
| 727 | { | 728 | /* |
| 728 | return __root_device_register(name, THIS_MODULE); | 729 | * This is a macro to avoid include problems with THIS_MODULE, |
| 729 | } | 730 | * just as per what is done for device_schedule_callback() above. |
| 731 | */ | ||
| 732 | #define root_device_register(name) \ | ||
| 733 | __root_device_register(name, THIS_MODULE) | ||
| 734 | |||
| 730 | extern void root_device_unregister(struct device *root); | 735 | extern void root_device_unregister(struct device *root); |
| 731 | 736 | ||
| 732 | static inline void *dev_get_platdata(const struct device *dev) | 737 | static inline void *dev_get_platdata(const struct device *dev) |
diff --git a/include/linux/device_cgroup.h b/include/linux/device_cgroup.h index 7aad1f440867..8b64221b432b 100644 --- a/include/linux/device_cgroup.h +++ b/include/linux/device_cgroup.h | |||
| @@ -1,4 +1,3 @@ | |||
| 1 | #include <linux/module.h> | ||
| 2 | #include <linux/fs.h> | 1 | #include <linux/fs.h> |
| 3 | 2 | ||
| 4 | #ifdef CONFIG_CGROUP_DEVICE | 3 | #ifdef CONFIG_CGROUP_DEVICE |
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index ace51af4369f..75f53f874b24 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
| @@ -25,6 +25,8 @@ | |||
| 25 | #include <linux/uio.h> | 25 | #include <linux/uio.h> |
| 26 | #include <linux/dma-direction.h> | 26 | #include <linux/dma-direction.h> |
| 27 | #include <linux/scatterlist.h> | 27 | #include <linux/scatterlist.h> |
| 28 | #include <linux/bitmap.h> | ||
| 29 | #include <asm/page.h> | ||
| 28 | 30 | ||
| 29 | /** | 31 | /** |
| 30 | * typedef dma_cookie_t - an opaque DMA cookie | 32 | * typedef dma_cookie_t - an opaque DMA cookie |
diff --git a/include/linux/export.h b/include/linux/export.h new file mode 100644 index 000000000000..696c0f48afc7 --- /dev/null +++ b/include/linux/export.h | |||
| @@ -0,0 +1,89 @@ | |||
| 1 | #ifndef _LINUX_EXPORT_H | ||
| 2 | #define _LINUX_EXPORT_H | ||
| 3 | /* | ||
| 4 | * Export symbols from the kernel to modules. Forked from module.h | ||
| 5 | * to reduce the amount of pointless cruft we feed to gcc when only | ||
| 6 | * exporting a simple symbol or two. | ||
| 7 | * | ||
| 8 | * If you feel the need to add #include <linux/foo.h> to this file | ||
| 9 | * then you are doing something wrong and should go away silently. | ||
| 10 | */ | ||
| 11 | |||
| 12 | /* Some toolchains use a `_' prefix for all user symbols. */ | ||
| 13 | #ifdef CONFIG_SYMBOL_PREFIX | ||
| 14 | #define MODULE_SYMBOL_PREFIX CONFIG_SYMBOL_PREFIX | ||
| 15 | #else | ||
| 16 | #define MODULE_SYMBOL_PREFIX "" | ||
| 17 | #endif | ||
| 18 | |||
| 19 | struct kernel_symbol | ||
| 20 | { | ||
| 21 | unsigned long value; | ||
| 22 | const char *name; | ||
| 23 | }; | ||
| 24 | |||
| 25 | #ifdef MODULE | ||
| 26 | extern struct module __this_module; | ||
| 27 | #define THIS_MODULE (&__this_module) | ||
| 28 | #else | ||
| 29 | #define THIS_MODULE ((struct module *)0) | ||
| 30 | #endif | ||
| 31 | |||
| 32 | #ifdef CONFIG_MODULES | ||
| 33 | |||
| 34 | #ifndef __GENKSYMS__ | ||
| 35 | #ifdef CONFIG_MODVERSIONS | ||
| 36 | /* Mark the CRC weak since genksyms apparently decides not to | ||
| 37 | * generate a checksums for some symbols */ | ||
| 38 | #define __CRC_SYMBOL(sym, sec) \ | ||
| 39 | extern void *__crc_##sym __attribute__((weak)); \ | ||
| 40 | static const unsigned long __kcrctab_##sym \ | ||
| 41 | __used \ | ||
| 42 | __attribute__((section("___kcrctab" sec "+" #sym), unused)) \ | ||
| 43 | = (unsigned long) &__crc_##sym; | ||
| 44 | #else | ||
| 45 | #define __CRC_SYMBOL(sym, sec) | ||
| 46 | #endif | ||
| 47 | |||
| 48 | /* For every exported symbol, place a struct in the __ksymtab section */ | ||
| 49 | #define __EXPORT_SYMBOL(sym, sec) \ | ||
| 50 | extern typeof(sym) sym; \ | ||
| 51 | __CRC_SYMBOL(sym, sec) \ | ||
| 52 | static const char __kstrtab_##sym[] \ | ||
| 53 | __attribute__((section("__ksymtab_strings"), aligned(1))) \ | ||
| 54 | = MODULE_SYMBOL_PREFIX #sym; \ | ||
| 55 | static const struct kernel_symbol __ksymtab_##sym \ | ||
| 56 | __used \ | ||
| 57 | __attribute__((section("___ksymtab" sec "+" #sym), unused)) \ | ||
| 58 | = { (unsigned long)&sym, __kstrtab_##sym } | ||
| 59 | |||
| 60 | #define EXPORT_SYMBOL(sym) \ | ||
| 61 | __EXPORT_SYMBOL(sym, "") | ||
| 62 | |||
| 63 | #define EXPORT_SYMBOL_GPL(sym) \ | ||
| 64 | __EXPORT_SYMBOL(sym, "_gpl") | ||
| 65 | |||
| 66 | #define EXPORT_SYMBOL_GPL_FUTURE(sym) \ | ||
| 67 | __EXPORT_SYMBOL(sym, "_gpl_future") | ||
| 68 | |||
| 69 | #ifdef CONFIG_UNUSED_SYMBOLS | ||
| 70 | #define EXPORT_UNUSED_SYMBOL(sym) __EXPORT_SYMBOL(sym, "_unused") | ||
| 71 | #define EXPORT_UNUSED_SYMBOL_GPL(sym) __EXPORT_SYMBOL(sym, "_unused_gpl") | ||
| 72 | #else | ||
| 73 | #define EXPORT_UNUSED_SYMBOL(sym) | ||
| 74 | #define EXPORT_UNUSED_SYMBOL_GPL(sym) | ||
| 75 | #endif | ||
| 76 | |||
| 77 | #endif /* __GENKSYMS__ */ | ||
| 78 | |||
| 79 | #else /* !CONFIG_MODULES... */ | ||
| 80 | |||
| 81 | #define EXPORT_SYMBOL(sym) | ||
| 82 | #define EXPORT_SYMBOL_GPL(sym) | ||
| 83 | #define EXPORT_SYMBOL_GPL_FUTURE(sym) | ||
| 84 | #define EXPORT_UNUSED_SYMBOL(sym) | ||
| 85 | #define EXPORT_UNUSED_SYMBOL_GPL(sym) | ||
| 86 | |||
| 87 | #endif /* CONFIG_MODULES */ | ||
| 88 | |||
| 89 | #endif /* _LINUX_EXPORT_H */ | ||
diff --git a/include/linux/firmware.h b/include/linux/firmware.h index 21b3e7588abd..1e7c01189fa6 100644 --- a/include/linux/firmware.h +++ b/include/linux/firmware.h | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | #ifndef _LINUX_FIRMWARE_H | 1 | #ifndef _LINUX_FIRMWARE_H |
| 2 | #define _LINUX_FIRMWARE_H | 2 | #define _LINUX_FIRMWARE_H |
| 3 | 3 | ||
| 4 | #include <linux/module.h> | ||
| 5 | #include <linux/types.h> | 4 | #include <linux/types.h> |
| 6 | #include <linux/compiler.h> | 5 | #include <linux/compiler.h> |
| 7 | #include <linux/gfp.h> | 6 | #include <linux/gfp.h> |
| @@ -15,6 +14,7 @@ struct firmware { | |||
| 15 | struct page **pages; | 14 | struct page **pages; |
| 16 | }; | 15 | }; |
| 17 | 16 | ||
| 17 | struct module; | ||
| 18 | struct device; | 18 | struct device; |
| 19 | 19 | ||
| 20 | struct builtin_fw { | 20 | struct builtin_fw { |
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index f0c0e8a47ae6..26eafcef75be 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
| @@ -10,7 +10,6 @@ | |||
| 10 | #include <linux/kallsyms.h> | 10 | #include <linux/kallsyms.h> |
| 11 | #include <linux/linkage.h> | 11 | #include <linux/linkage.h> |
| 12 | #include <linux/bitops.h> | 12 | #include <linux/bitops.h> |
| 13 | #include <linux/module.h> | ||
| 14 | #include <linux/ktime.h> | 13 | #include <linux/ktime.h> |
| 15 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
| 16 | #include <linux/types.h> | 15 | #include <linux/types.h> |
| @@ -19,6 +18,7 @@ | |||
| 19 | 18 | ||
| 20 | #include <asm/ftrace.h> | 19 | #include <asm/ftrace.h> |
| 21 | 20 | ||
| 21 | struct module; | ||
| 22 | struct ftrace_hash; | 22 | struct ftrace_hash; |
| 23 | 23 | ||
| 24 | #ifdef CONFIG_FUNCTION_TRACER | 24 | #ifdef CONFIG_FUNCTION_TRACER |
diff --git a/include/linux/gameport.h b/include/linux/gameport.h index 069ee4139105..b456b08d70ed 100644 --- a/include/linux/gameport.h +++ b/include/linux/gameport.h | |||
| @@ -71,10 +71,9 @@ void gameport_close(struct gameport *gameport); | |||
| 71 | #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE)) | 71 | #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE)) |
| 72 | 72 | ||
| 73 | void __gameport_register_port(struct gameport *gameport, struct module *owner); | 73 | void __gameport_register_port(struct gameport *gameport, struct module *owner); |
| 74 | static inline void gameport_register_port(struct gameport *gameport) | 74 | /* use a define to avoid include chaining to get THIS_MODULE */ |
| 75 | { | 75 | #define gameport_register_port(gameport) \ |
| 76 | __gameport_register_port(gameport, THIS_MODULE); | 76 | __gameport_register_port(gameport, THIS_MODULE) |
| 77 | } | ||
| 78 | 77 | ||
| 79 | void gameport_unregister_port(struct gameport *gameport); | 78 | void gameport_unregister_port(struct gameport *gameport); |
| 80 | 79 | ||
| @@ -145,12 +144,12 @@ static inline void gameport_unpin_driver(struct gameport *gameport) | |||
| 145 | mutex_unlock(&gameport->drv_mutex); | 144 | mutex_unlock(&gameport->drv_mutex); |
| 146 | } | 145 | } |
| 147 | 146 | ||
| 148 | int __gameport_register_driver(struct gameport_driver *drv, | 147 | int __must_check __gameport_register_driver(struct gameport_driver *drv, |
| 149 | struct module *owner, const char *mod_name); | 148 | struct module *owner, const char *mod_name); |
| 150 | static inline int __must_check gameport_register_driver(struct gameport_driver *drv) | 149 | |
| 151 | { | 150 | /* use a define to avoid include chaining to get THIS_MODULE & friends */ |
| 152 | return __gameport_register_driver(drv, THIS_MODULE, KBUILD_MODNAME); | 151 | #define gameport_register_driver(drv) \ |
| 153 | } | 152 | __gameport_register_driver(drv, THIS_MODULE, KBUILD_MODNAME) |
| 154 | 153 | ||
| 155 | void gameport_unregister_driver(struct gameport_driver *drv); | 154 | void gameport_unregister_driver(struct gameport_driver *drv); |
| 156 | 155 | ||
diff --git a/include/linux/hid.h b/include/linux/hid.h index deed5f9a1e1c..c235e4e8767c 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
| @@ -697,10 +697,11 @@ extern void hid_destroy_device(struct hid_device *); | |||
| 697 | 697 | ||
| 698 | extern int __must_check __hid_register_driver(struct hid_driver *, | 698 | extern int __must_check __hid_register_driver(struct hid_driver *, |
| 699 | struct module *, const char *mod_name); | 699 | struct module *, const char *mod_name); |
| 700 | static inline int __must_check hid_register_driver(struct hid_driver *driver) | 700 | |
| 701 | { | 701 | /* use a define to avoid include chaining to get THIS_MODULE & friends */ |
| 702 | return __hid_register_driver(driver, THIS_MODULE, KBUILD_MODNAME); | 702 | #define hid_register_driver(driver) \ |
| 703 | } | 703 | __hid_register_driver(driver, THIS_MODULE, KBUILD_MODNAME) |
| 704 | |||
| 704 | extern void hid_unregister_driver(struct hid_driver *); | 705 | extern void hid_unregister_driver(struct hid_driver *); |
| 705 | 706 | ||
| 706 | extern void hidinput_hid_event(struct hid_device *, struct hid_field *, struct hid_usage *, __s32); | 707 | extern void hidinput_hid_event(struct hid_device *, struct hid_field *, struct hid_usage *, __s32); |
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 38a21c3edd2c..a81bf6d23b3e 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
| @@ -28,7 +28,6 @@ | |||
| 28 | 28 | ||
| 29 | #include <linux/types.h> | 29 | #include <linux/types.h> |
| 30 | #ifdef __KERNEL__ | 30 | #ifdef __KERNEL__ |
| 31 | #include <linux/module.h> | ||
| 32 | #include <linux/mod_devicetable.h> | 31 | #include <linux/mod_devicetable.h> |
| 33 | #include <linux/device.h> /* for struct device */ | 32 | #include <linux/device.h> /* for struct device */ |
| 34 | #include <linux/sched.h> /* for completion */ | 33 | #include <linux/sched.h> /* for completion */ |
| @@ -49,6 +48,8 @@ struct i2c_driver; | |||
| 49 | union i2c_smbus_data; | 48 | union i2c_smbus_data; |
| 50 | struct i2c_board_info; | 49 | struct i2c_board_info; |
| 51 | 50 | ||
| 51 | struct module; | ||
| 52 | |||
| 52 | #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) | 53 | #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) |
| 53 | /* | 54 | /* |
| 54 | * The master routines are the ones normally used to transmit data to devices | 55 | * The master routines are the ones normally used to transmit data to devices |
| @@ -451,10 +452,9 @@ extern int i2c_add_numbered_adapter(struct i2c_adapter *); | |||
| 451 | extern int i2c_register_driver(struct module *, struct i2c_driver *); | 452 | extern int i2c_register_driver(struct module *, struct i2c_driver *); |
| 452 | extern void i2c_del_driver(struct i2c_driver *); | 453 | extern void i2c_del_driver(struct i2c_driver *); |
| 453 | 454 | ||
| 454 | static inline int i2c_add_driver(struct i2c_driver *driver) | 455 | /* use a define to avoid include chaining to get THIS_MODULE */ |
| 455 | { | 456 | #define i2c_add_driver(driver) \ |
| 456 | return i2c_register_driver(THIS_MODULE, driver); | 457 | i2c_register_driver(THIS_MODULE, driver) |
| 457 | } | ||
| 458 | 458 | ||
| 459 | extern struct i2c_client *i2c_use_client(struct i2c_client *client); | 459 | extern struct i2c_client *i2c_use_client(struct i2c_client *client); |
| 460 | extern void i2c_release_client(struct i2c_client *client); | 460 | extern void i2c_release_client(struct i2c_client *client); |
diff --git a/include/linux/ipmi.h b/include/linux/ipmi.h index ca85cf894e33..bbd156bb953b 100644 --- a/include/linux/ipmi.h +++ b/include/linux/ipmi.h | |||
| @@ -220,10 +220,11 @@ struct kernel_ipmi_msg { | |||
| 220 | * The in-kernel interface. | 220 | * The in-kernel interface. |
| 221 | */ | 221 | */ |
| 222 | #include <linux/list.h> | 222 | #include <linux/list.h> |
| 223 | #include <linux/module.h> | ||
| 224 | #include <linux/device.h> | 223 | #include <linux/device.h> |
| 225 | #include <linux/proc_fs.h> | 224 | #include <linux/proc_fs.h> |
| 226 | 225 | ||
| 226 | struct module; | ||
| 227 | |||
| 227 | /* Opaque type for a IPMI message user. One of these is needed to | 228 | /* Opaque type for a IPMI message user. One of these is needed to |
| 228 | send and receive messages. */ | 229 | send and receive messages. */ |
| 229 | typedef struct ipmi_user *ipmi_user_t; | 230 | typedef struct ipmi_user *ipmi_user_t; |
diff --git a/include/linux/ipmi_smi.h b/include/linux/ipmi_smi.h index 204f9cd26c16..3ef0d8b6aa6f 100644 --- a/include/linux/ipmi_smi.h +++ b/include/linux/ipmi_smi.h | |||
| @@ -36,7 +36,6 @@ | |||
| 36 | 36 | ||
| 37 | #include <linux/ipmi_msgdefs.h> | 37 | #include <linux/ipmi_msgdefs.h> |
| 38 | #include <linux/proc_fs.h> | 38 | #include <linux/proc_fs.h> |
| 39 | #include <linux/module.h> | ||
| 40 | #include <linux/device.h> | 39 | #include <linux/device.h> |
| 41 | #include <linux/platform_device.h> | 40 | #include <linux/platform_device.h> |
| 42 | #include <linux/ipmi.h> | 41 | #include <linux/ipmi.h> |
diff --git a/include/linux/irq.h b/include/linux/irq.h index 59e49c80cc2c..bff29c58da23 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
| @@ -23,13 +23,13 @@ | |||
| 23 | #include <linux/errno.h> | 23 | #include <linux/errno.h> |
| 24 | #include <linux/topology.h> | 24 | #include <linux/topology.h> |
| 25 | #include <linux/wait.h> | 25 | #include <linux/wait.h> |
| 26 | #include <linux/module.h> | ||
| 27 | 26 | ||
| 28 | #include <asm/irq.h> | 27 | #include <asm/irq.h> |
| 29 | #include <asm/ptrace.h> | 28 | #include <asm/ptrace.h> |
| 30 | #include <asm/irq_regs.h> | 29 | #include <asm/irq_regs.h> |
| 31 | 30 | ||
| 32 | struct seq_file; | 31 | struct seq_file; |
| 32 | struct module; | ||
| 33 | struct irq_desc; | 33 | struct irq_desc; |
| 34 | struct irq_data; | 34 | struct irq_data; |
| 35 | typedef void (*irq_flow_handler_t)(unsigned int irq, | 35 | typedef void (*irq_flow_handler_t)(unsigned int irq, |
| @@ -567,29 +567,21 @@ static inline struct msi_desc *irq_data_get_msi(struct irq_data *d) | |||
| 567 | int __irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node, | 567 | int __irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node, |
| 568 | struct module *owner); | 568 | struct module *owner); |
| 569 | 569 | ||
| 570 | static inline int irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, | 570 | /* use macros to avoid needing export.h for THIS_MODULE */ |
| 571 | int node) | 571 | #define irq_alloc_descs(irq, from, cnt, node) \ |
| 572 | { | 572 | __irq_alloc_descs(irq, from, cnt, node, THIS_MODULE) |
| 573 | return __irq_alloc_descs(irq, from, cnt, node, THIS_MODULE); | ||
| 574 | } | ||
| 575 | 573 | ||
| 576 | void irq_free_descs(unsigned int irq, unsigned int cnt); | 574 | #define irq_alloc_desc(node) \ |
| 577 | int irq_reserve_irqs(unsigned int from, unsigned int cnt); | 575 | irq_alloc_descs(-1, 0, 1, node) |
| 578 | 576 | ||
| 579 | static inline int irq_alloc_desc(int node) | 577 | #define irq_alloc_desc_at(at, node) \ |
| 580 | { | 578 | irq_alloc_descs(at, at, 1, node) |
| 581 | return irq_alloc_descs(-1, 0, 1, node); | ||
| 582 | } | ||
| 583 | 579 | ||
| 584 | static inline int irq_alloc_desc_at(unsigned int at, int node) | 580 | #define irq_alloc_desc_from(from, node) \ |
| 585 | { | 581 | irq_alloc_descs(-1, from, 1, node) |
| 586 | return irq_alloc_descs(at, at, 1, node); | ||
| 587 | } | ||
| 588 | 582 | ||
| 589 | static inline int irq_alloc_desc_from(unsigned int from, int node) | 583 | void irq_free_descs(unsigned int irq, unsigned int cnt); |
| 590 | { | 584 | int irq_reserve_irqs(unsigned int from, unsigned int cnt); |
| 591 | return irq_alloc_descs(-1, from, 1, node); | ||
| 592 | } | ||
| 593 | 585 | ||
| 594 | static inline void irq_free_desc(unsigned int irq) | 586 | static inline void irq_free_desc(unsigned int irq) |
| 595 | { | 587 | { |
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h index 6b69c2c9dff1..f1e2527006bd 100644 --- a/include/linux/irqdesc.h +++ b/include/linux/irqdesc.h | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | struct irq_affinity_notify; | 11 | struct irq_affinity_notify; |
| 12 | struct proc_dir_entry; | 12 | struct proc_dir_entry; |
| 13 | struct timer_rand_state; | 13 | struct timer_rand_state; |
| 14 | struct module; | ||
| 14 | /** | 15 | /** |
| 15 | * struct irq_desc - interrupt descriptor | 16 | * struct irq_desc - interrupt descriptor |
| 16 | * @irq_data: per irq and chip data passed down to chip functions | 17 | * @irq_data: per irq and chip data passed down to chip functions |
diff --git a/include/linux/mdio-bitbang.h b/include/linux/mdio-bitbang.h index 8ea9a42a4c02..0fe00cd4c93c 100644 --- a/include/linux/mdio-bitbang.h +++ b/include/linux/mdio-bitbang.h | |||
| @@ -2,7 +2,8 @@ | |||
| 2 | #define __LINUX_MDIO_BITBANG_H | 2 | #define __LINUX_MDIO_BITBANG_H |
| 3 | 3 | ||
| 4 | #include <linux/phy.h> | 4 | #include <linux/phy.h> |
| 5 | #include <linux/module.h> | 5 | |
| 6 | struct module; | ||
| 6 | 7 | ||
| 7 | struct mdiobb_ctrl; | 8 | struct mdiobb_ctrl; |
| 8 | 9 | ||
diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h index c309b1ecdc1c..c41d7270c6c6 100644 --- a/include/linux/miscdevice.h +++ b/include/linux/miscdevice.h | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | #ifndef _LINUX_MISCDEVICE_H | 1 | #ifndef _LINUX_MISCDEVICE_H |
| 2 | #define _LINUX_MISCDEVICE_H | 2 | #define _LINUX_MISCDEVICE_H |
| 3 | #include <linux/module.h> | ||
| 4 | #include <linux/major.h> | 3 | #include <linux/major.h> |
| 4 | #include <linux/list.h> | ||
| 5 | #include <linux/types.h> | ||
| 5 | 6 | ||
| 6 | /* | 7 | /* |
| 7 | * These allocations are managed by device@lanana.org. If you use an | 8 | * These allocations are managed by device@lanana.org. If you use an |
diff --git a/include/linux/module.h b/include/linux/module.h index 863921637d9f..3cb7839a60b9 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #include <linux/kobject.h> | 16 | #include <linux/kobject.h> |
| 17 | #include <linux/moduleparam.h> | 17 | #include <linux/moduleparam.h> |
| 18 | #include <linux/tracepoint.h> | 18 | #include <linux/tracepoint.h> |
| 19 | #include <linux/export.h> | ||
| 19 | 20 | ||
| 20 | #include <linux/percpu.h> | 21 | #include <linux/percpu.h> |
| 21 | #include <asm/module.h> | 22 | #include <asm/module.h> |
| @@ -25,21 +26,8 @@ | |||
| 25 | /* Not Yet Implemented */ | 26 | /* Not Yet Implemented */ |
| 26 | #define MODULE_SUPPORTED_DEVICE(name) | 27 | #define MODULE_SUPPORTED_DEVICE(name) |
| 27 | 28 | ||
| 28 | /* Some toolchains use a `_' prefix for all user symbols. */ | ||
| 29 | #ifdef CONFIG_SYMBOL_PREFIX | ||
| 30 | #define MODULE_SYMBOL_PREFIX CONFIG_SYMBOL_PREFIX | ||
| 31 | #else | ||
| 32 | #define MODULE_SYMBOL_PREFIX "" | ||
| 33 | #endif | ||
| 34 | |||
| 35 | #define MODULE_NAME_LEN MAX_PARAM_PREFIX_LEN | 29 | #define MODULE_NAME_LEN MAX_PARAM_PREFIX_LEN |
| 36 | 30 | ||
| 37 | struct kernel_symbol | ||
| 38 | { | ||
| 39 | unsigned long value; | ||
| 40 | const char *name; | ||
| 41 | }; | ||
| 42 | |||
| 43 | struct modversion_info | 31 | struct modversion_info |
| 44 | { | 32 | { |
| 45 | unsigned long crc; | 33 | unsigned long crc; |
| @@ -98,11 +86,8 @@ void trim_init_extable(struct module *m); | |||
| 98 | extern const struct gtype##_id __mod_##gtype##_table \ | 86 | extern const struct gtype##_id __mod_##gtype##_table \ |
| 99 | __attribute__ ((unused, alias(__stringify(name)))) | 87 | __attribute__ ((unused, alias(__stringify(name)))) |
| 100 | 88 | ||
| 101 | extern struct module __this_module; | ||
| 102 | #define THIS_MODULE (&__this_module) | ||
| 103 | #else /* !MODULE */ | 89 | #else /* !MODULE */ |
| 104 | #define MODULE_GENERIC_TABLE(gtype,name) | 90 | #define MODULE_GENERIC_TABLE(gtype,name) |
| 105 | #define THIS_MODULE ((struct module *)0) | ||
| 106 | #endif | 91 | #endif |
| 107 | 92 | ||
| 108 | /* Generic info of form tag = "info" */ | 93 | /* Generic info of form tag = "info" */ |
| @@ -150,11 +135,6 @@ extern struct module __this_module; | |||
| 150 | /* What your module does. */ | 135 | /* What your module does. */ |
| 151 | #define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description) | 136 | #define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description) |
| 152 | 137 | ||
| 153 | /* One for each parameter, describing how to use it. Some files do | ||
| 154 | multiple of these per line, so can't just use MODULE_INFO. */ | ||
| 155 | #define MODULE_PARM_DESC(_parm, desc) \ | ||
| 156 | __MODULE_INFO(parm, _parm, #_parm ":" desc) | ||
| 157 | |||
| 158 | #define MODULE_DEVICE_TABLE(type,name) \ | 138 | #define MODULE_DEVICE_TABLE(type,name) \ |
| 159 | MODULE_GENERIC_TABLE(type##_device,name) | 139 | MODULE_GENERIC_TABLE(type##_device,name) |
| 160 | 140 | ||
| @@ -218,52 +198,6 @@ struct module_use { | |||
| 218 | struct module *source, *target; | 198 | struct module *source, *target; |
| 219 | }; | 199 | }; |
| 220 | 200 | ||
| 221 | #ifndef __GENKSYMS__ | ||
| 222 | #ifdef CONFIG_MODVERSIONS | ||
| 223 | /* Mark the CRC weak since genksyms apparently decides not to | ||
| 224 | * generate a checksums for some symbols */ | ||
| 225 | #define __CRC_SYMBOL(sym, sec) \ | ||
| 226 | extern void *__crc_##sym __attribute__((weak)); \ | ||
| 227 | static const unsigned long __kcrctab_##sym \ | ||
| 228 | __used \ | ||
| 229 | __attribute__((section("___kcrctab" sec "+" #sym), unused)) \ | ||
| 230 | = (unsigned long) &__crc_##sym; | ||
| 231 | #else | ||
| 232 | #define __CRC_SYMBOL(sym, sec) | ||
| 233 | #endif | ||
| 234 | |||
| 235 | /* For every exported symbol, place a struct in the __ksymtab section */ | ||
| 236 | #define __EXPORT_SYMBOL(sym, sec) \ | ||
| 237 | extern typeof(sym) sym; \ | ||
| 238 | __CRC_SYMBOL(sym, sec) \ | ||
| 239 | static const char __kstrtab_##sym[] \ | ||
| 240 | __attribute__((section("__ksymtab_strings"), aligned(1))) \ | ||
| 241 | = MODULE_SYMBOL_PREFIX #sym; \ | ||
| 242 | static const struct kernel_symbol __ksymtab_##sym \ | ||
| 243 | __used \ | ||
| 244 | __attribute__((section("___ksymtab" sec "+" #sym), unused)) \ | ||
| 245 | = { (unsigned long)&sym, __kstrtab_##sym } | ||
| 246 | |||
| 247 | #define EXPORT_SYMBOL(sym) \ | ||
| 248 | __EXPORT_SYMBOL(sym, "") | ||
| 249 | |||
| 250 | #define EXPORT_SYMBOL_GPL(sym) \ | ||
| 251 | __EXPORT_SYMBOL(sym, "_gpl") | ||
| 252 | |||
| 253 | #define EXPORT_SYMBOL_GPL_FUTURE(sym) \ | ||
| 254 | __EXPORT_SYMBOL(sym, "_gpl_future") | ||
| 255 | |||
| 256 | |||
| 257 | #ifdef CONFIG_UNUSED_SYMBOLS | ||
| 258 | #define EXPORT_UNUSED_SYMBOL(sym) __EXPORT_SYMBOL(sym, "_unused") | ||
| 259 | #define EXPORT_UNUSED_SYMBOL_GPL(sym) __EXPORT_SYMBOL(sym, "_unused_gpl") | ||
| 260 | #else | ||
| 261 | #define EXPORT_UNUSED_SYMBOL(sym) | ||
| 262 | #define EXPORT_UNUSED_SYMBOL_GPL(sym) | ||
| 263 | #endif | ||
| 264 | |||
| 265 | #endif | ||
| 266 | |||
| 267 | enum module_state | 201 | enum module_state |
| 268 | { | 202 | { |
| 269 | MODULE_STATE_LIVE, | 203 | MODULE_STATE_LIVE, |
| @@ -581,11 +515,6 @@ int unregister_module_notifier(struct notifier_block * nb); | |||
| 581 | extern void print_modules(void); | 515 | extern void print_modules(void); |
| 582 | 516 | ||
| 583 | #else /* !CONFIG_MODULES... */ | 517 | #else /* !CONFIG_MODULES... */ |
| 584 | #define EXPORT_SYMBOL(sym) | ||
| 585 | #define EXPORT_SYMBOL_GPL(sym) | ||
| 586 | #define EXPORT_SYMBOL_GPL_FUTURE(sym) | ||
| 587 | #define EXPORT_UNUSED_SYMBOL(sym) | ||
| 588 | #define EXPORT_UNUSED_SYMBOL_GPL(sym) | ||
| 589 | 518 | ||
| 590 | /* Given an address, look for it in the exception tables. */ | 519 | /* Given an address, look for it in the exception tables. */ |
| 591 | static inline const struct exception_table_entry * | 520 | static inline const struct exception_table_entry * |
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index fffb10bd5514..7939f636c8ba 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h | |||
| @@ -31,6 +31,11 @@ static const char __module_cat(name,__LINE__)[] \ | |||
| 31 | #define __MODULE_PARM_TYPE(name, _type) \ | 31 | #define __MODULE_PARM_TYPE(name, _type) \ |
| 32 | __MODULE_INFO(parmtype, name##type, #name ":" _type) | 32 | __MODULE_INFO(parmtype, name##type, #name ":" _type) |
| 33 | 33 | ||
| 34 | /* One for each parameter, describing how to use it. Some files do | ||
| 35 | multiple of these per line, so can't just use MODULE_INFO. */ | ||
| 36 | #define MODULE_PARM_DESC(_parm, desc) \ | ||
| 37 | __MODULE_INFO(parm, _parm, #_parm ":" desc) | ||
| 38 | |||
| 34 | struct kernel_param; | 39 | struct kernel_param; |
| 35 | 40 | ||
| 36 | struct kernel_param_ops { | 41 | struct kernel_param_ops { |
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 2541fb848daa..37be05bbfbc8 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
| @@ -21,7 +21,6 @@ | |||
| 21 | #define __MTD_MTD_H__ | 21 | #define __MTD_MTD_H__ |
| 22 | 22 | ||
| 23 | #include <linux/types.h> | 23 | #include <linux/types.h> |
| 24 | #include <linux/module.h> | ||
| 25 | #include <linux/uio.h> | 24 | #include <linux/uio.h> |
| 26 | #include <linux/notifier.h> | 25 | #include <linux/notifier.h> |
| 27 | #include <linux/device.h> | 26 | #include <linux/device.h> |
| @@ -125,6 +124,8 @@ struct nand_ecclayout { | |||
| 125 | struct nand_oobfree oobfree[MTD_MAX_OOBFREE_ENTRIES_LARGE]; | 124 | struct nand_oobfree oobfree[MTD_MAX_OOBFREE_ENTRIES_LARGE]; |
| 126 | }; | 125 | }; |
| 127 | 126 | ||
| 127 | struct module; /* only needed for owner field in mtd_info */ | ||
| 128 | |||
| 128 | struct mtd_info { | 129 | struct mtd_info { |
| 129 | u_char type; | 130 | u_char type; |
| 130 | uint32_t flags; | 131 | uint32_t flags; |
diff --git a/include/linux/of.h b/include/linux/of.h index 0e89aa0bf07a..4948552d60f5 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | #include <linux/spinlock.h> | 23 | #include <linux/spinlock.h> |
| 24 | 24 | ||
| 25 | #include <asm/byteorder.h> | 25 | #include <asm/byteorder.h> |
| 26 | #include <asm/errno.h> | ||
| 26 | 27 | ||
| 27 | typedef u32 phandle; | 28 | typedef u32 phandle; |
| 28 | typedef u32 ihandle; | 29 | typedef u32 ihandle; |
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h index 5a6f458a4bb7..040ce2f6e8de 100644 --- a/include/linux/of_platform.h +++ b/include/linux/of_platform.h | |||
| @@ -12,7 +12,6 @@ | |||
| 12 | */ | 12 | */ |
| 13 | 13 | ||
| 14 | #ifdef CONFIG_OF_DEVICE | 14 | #ifdef CONFIG_OF_DEVICE |
| 15 | #include <linux/module.h> | ||
| 16 | #include <linux/device.h> | 15 | #include <linux/device.h> |
| 17 | #include <linux/mod_devicetable.h> | 16 | #include <linux/mod_devicetable.h> |
| 18 | #include <linux/pm.h> | 17 | #include <linux/pm.h> |
diff --git a/include/linux/pci_hotplug.h b/include/linux/pci_hotplug.h index 5d09cbafa7db..45fc162cbdc0 100644 --- a/include/linux/pci_hotplug.h +++ b/include/linux/pci_hotplug.h | |||
| @@ -132,13 +132,9 @@ extern int pci_hp_deregister(struct hotplug_slot *slot); | |||
| 132 | extern int __must_check pci_hp_change_slot_info (struct hotplug_slot *slot, | 132 | extern int __must_check pci_hp_change_slot_info (struct hotplug_slot *slot, |
| 133 | struct hotplug_slot_info *info); | 133 | struct hotplug_slot_info *info); |
| 134 | 134 | ||
| 135 | static inline int pci_hp_register(struct hotplug_slot *slot, | 135 | /* use a define to avoid include chaining to get THIS_MODULE & friends */ |
| 136 | struct pci_bus *pbus, | 136 | #define pci_hp_register(slot, pbus, devnr, name) \ |
| 137 | int devnr, const char *name) | 137 | __pci_hp_register(slot, pbus, devnr, name, THIS_MODULE, KBUILD_MODNAME) |
| 138 | { | ||
| 139 | return __pci_hp_register(slot, pbus, devnr, name, | ||
| 140 | THIS_MODULE, KBUILD_MODNAME); | ||
| 141 | } | ||
| 142 | 138 | ||
| 143 | /* PCI Setting Record (Type 0) */ | 139 | /* PCI Setting Record (Type 0) */ |
| 144 | struct hpp_type0 { | 140 | struct hpp_type0 { |
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h index 70b284024d9e..d8d903619642 100644 --- a/include/linux/pm_runtime.h +++ b/include/linux/pm_runtime.h | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | #define _LINUX_PM_RUNTIME_H | 10 | #define _LINUX_PM_RUNTIME_H |
| 11 | 11 | ||
| 12 | #include <linux/device.h> | 12 | #include <linux/device.h> |
| 13 | #include <linux/notifier.h> | ||
| 13 | #include <linux/pm.h> | 14 | #include <linux/pm.h> |
| 14 | 15 | ||
| 15 | #include <linux/jiffies.h> | 16 | #include <linux/jiffies.h> |
diff --git a/include/linux/regmap.h b/include/linux/regmap.h index 3daac2d8dc37..690276a642cf 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h | |||
| @@ -15,8 +15,8 @@ | |||
| 15 | 15 | ||
| 16 | #include <linux/device.h> | 16 | #include <linux/device.h> |
| 17 | #include <linux/list.h> | 17 | #include <linux/list.h> |
| 18 | #include <linux/module.h> | ||
| 19 | 18 | ||
| 19 | struct module; | ||
| 20 | struct i2c_client; | 20 | struct i2c_client; |
| 21 | struct spi_device; | 21 | struct spi_device; |
| 22 | 22 | ||
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index 12a1aa04b720..52c89ae32f64 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #define __LINUX_REGULATOR_DRIVER_H_ | 16 | #define __LINUX_REGULATOR_DRIVER_H_ |
| 17 | 17 | ||
| 18 | #include <linux/device.h> | 18 | #include <linux/device.h> |
| 19 | #include <linux/notifier.h> | ||
| 19 | #include <linux/regulator/consumer.h> | 20 | #include <linux/regulator/consumer.h> |
| 20 | 21 | ||
| 21 | struct regulator_dev; | 22 | struct regulator_dev; |
diff --git a/include/linux/serio.h b/include/linux/serio.h index be7dfb0f12d0..ca82861b0e46 100644 --- a/include/linux/serio.h +++ b/include/linux/serio.h | |||
| @@ -79,19 +79,21 @@ void serio_reconnect(struct serio *serio); | |||
| 79 | irqreturn_t serio_interrupt(struct serio *serio, unsigned char data, unsigned int flags); | 79 | irqreturn_t serio_interrupt(struct serio *serio, unsigned char data, unsigned int flags); |
| 80 | 80 | ||
| 81 | void __serio_register_port(struct serio *serio, struct module *owner); | 81 | void __serio_register_port(struct serio *serio, struct module *owner); |
| 82 | static inline void serio_register_port(struct serio *serio) | 82 | |
| 83 | { | 83 | /* use a define to avoid include chaining to get THIS_MODULE */ |
| 84 | __serio_register_port(serio, THIS_MODULE); | 84 | #define serio_register_port(serio) \ |
| 85 | } | 85 | __serio_register_port(serio, THIS_MODULE) |
| 86 | 86 | ||
| 87 | void serio_unregister_port(struct serio *serio); | 87 | void serio_unregister_port(struct serio *serio); |
| 88 | void serio_unregister_child_port(struct serio *serio); | 88 | void serio_unregister_child_port(struct serio *serio); |
| 89 | 89 | ||
| 90 | int __serio_register_driver(struct serio_driver *drv, struct module *owner, const char *mod_name); | 90 | int __must_check __serio_register_driver(struct serio_driver *drv, |
| 91 | static inline int __must_check serio_register_driver(struct serio_driver *drv) | 91 | struct module *owner, const char *mod_name); |
| 92 | { | 92 | |
| 93 | return __serio_register_driver(drv, THIS_MODULE, KBUILD_MODNAME); | 93 | /* use a define to avoid include chaining to get THIS_MODULE & friends */ |
| 94 | } | 94 | #define serio_register_driver(drv) \ |
| 95 | __serio_register_driver(drv, THIS_MODULE, KBUILD_MODNAME) | ||
| 96 | |||
| 95 | void serio_unregister_driver(struct serio_driver *drv); | 97 | void serio_unregister_driver(struct serio_driver *drv); |
| 96 | 98 | ||
| 97 | static inline int serio_write(struct serio *serio, unsigned char data) | 99 | static inline int serio_write(struct serio *serio, unsigned char data) |
diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h index f10ed7b4a714..061e560251b4 100644 --- a/include/linux/ssb/ssb.h +++ b/include/linux/ssb/ssb.h | |||
| @@ -231,10 +231,9 @@ struct ssb_driver { | |||
| 231 | #define drv_to_ssb_drv(_drv) container_of(_drv, struct ssb_driver, drv) | 231 | #define drv_to_ssb_drv(_drv) container_of(_drv, struct ssb_driver, drv) |
| 232 | 232 | ||
| 233 | extern int __ssb_driver_register(struct ssb_driver *drv, struct module *owner); | 233 | extern int __ssb_driver_register(struct ssb_driver *drv, struct module *owner); |
| 234 | static inline int ssb_driver_register(struct ssb_driver *drv) | 234 | #define ssb_driver_register(drv) \ |
| 235 | { | 235 | __ssb_driver_register(drv, THIS_MODULE) |
| 236 | return __ssb_driver_register(drv, THIS_MODULE); | 236 | |
| 237 | } | ||
| 238 | extern void ssb_driver_unregister(struct ssb_driver *drv); | 237 | extern void ssb_driver_unregister(struct ssb_driver *drv); |
| 239 | 238 | ||
| 240 | 239 | ||
diff --git a/include/linux/stop_machine.h b/include/linux/stop_machine.h index 2d04ea916760..c170edc3bf5f 100644 --- a/include/linux/stop_machine.h +++ b/include/linux/stop_machine.h | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | #include <linux/cpu.h> | 4 | #include <linux/cpu.h> |
| 5 | #include <linux/cpumask.h> | 5 | #include <linux/cpumask.h> |
| 6 | #include <linux/smp.h> | ||
| 6 | #include <linux/list.h> | 7 | #include <linux/list.h> |
| 7 | #include <asm/system.h> | 8 | #include <asm/system.h> |
| 8 | 9 | ||
diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h index 7ad9751a0d87..8620f79658d4 100644 --- a/include/linux/sunrpc/svc_xprt.h +++ b/include/linux/sunrpc/svc_xprt.h | |||
| @@ -8,7 +8,8 @@ | |||
| 8 | #define SUNRPC_SVC_XPRT_H | 8 | #define SUNRPC_SVC_XPRT_H |
| 9 | 9 | ||
| 10 | #include <linux/sunrpc/svc.h> | 10 | #include <linux/sunrpc/svc.h> |
| 11 | #include <linux/module.h> | 11 | |
| 12 | struct module; | ||
| 12 | 13 | ||
| 13 | struct svc_xprt_ops { | 14 | struct svc_xprt_ops { |
| 14 | struct svc_xprt *(*xpo_create)(struct svc_serv *, | 15 | struct svc_xprt *(*xpo_create)(struct svc_serv *, |
diff --git a/include/linux/sysdev.h b/include/linux/sysdev.h index d35e783a598c..20f63d3e6144 100644 --- a/include/linux/sysdev.h +++ b/include/linux/sysdev.h | |||
| @@ -22,7 +22,6 @@ | |||
| 22 | #define _SYSDEV_H_ | 22 | #define _SYSDEV_H_ |
| 23 | 23 | ||
| 24 | #include <linux/kobject.h> | 24 | #include <linux/kobject.h> |
| 25 | #include <linux/module.h> | ||
| 26 | #include <linux/pm.h> | 25 | #include <linux/pm.h> |
| 27 | 26 | ||
| 28 | 27 | ||
diff --git a/include/linux/textsearch.h b/include/linux/textsearch.h index d9a85d616385..cfaee869146f 100644 --- a/include/linux/textsearch.h +++ b/include/linux/textsearch.h | |||
| @@ -4,10 +4,11 @@ | |||
| 4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
| 5 | #include <linux/list.h> | 5 | #include <linux/list.h> |
| 6 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
| 7 | #include <linux/module.h> | ||
| 8 | #include <linux/err.h> | 7 | #include <linux/err.h> |
| 9 | #include <linux/slab.h> | 8 | #include <linux/slab.h> |
| 10 | 9 | ||
| 10 | struct module; | ||
| 11 | |||
| 11 | struct ts_config; | 12 | struct ts_config; |
| 12 | 13 | ||
| 13 | #define TS_AUTOLOAD 1 /* Automatically load textsearch modules when needed */ | 14 | #define TS_AUTOLOAD 1 /* Automatically load textsearch modules when needed */ |
diff --git a/include/linux/uio_driver.h b/include/linux/uio_driver.h index fd99ff9298c6..1ad4724458de 100644 --- a/include/linux/uio_driver.h +++ b/include/linux/uio_driver.h | |||
| @@ -14,10 +14,10 @@ | |||
| 14 | #ifndef _UIO_DRIVER_H_ | 14 | #ifndef _UIO_DRIVER_H_ |
| 15 | #define _UIO_DRIVER_H_ | 15 | #define _UIO_DRIVER_H_ |
| 16 | 16 | ||
| 17 | #include <linux/module.h> | ||
| 18 | #include <linux/fs.h> | 17 | #include <linux/fs.h> |
| 19 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
| 20 | 19 | ||
| 20 | struct module; | ||
| 21 | struct uio_map; | 21 | struct uio_map; |
| 22 | 22 | ||
| 23 | /** | 23 | /** |
| @@ -101,11 +101,11 @@ extern int __must_check | |||
| 101 | __uio_register_device(struct module *owner, | 101 | __uio_register_device(struct module *owner, |
| 102 | struct device *parent, | 102 | struct device *parent, |
| 103 | struct uio_info *info); | 103 | struct uio_info *info); |
| 104 | static inline int __must_check | 104 | |
| 105 | uio_register_device(struct device *parent, struct uio_info *info) | 105 | /* use a define to avoid include chaining to get THIS_MODULE */ |
| 106 | { | 106 | #define uio_register_device(parent, info) \ |
| 107 | return __uio_register_device(THIS_MODULE, parent, info); | 107 | __uio_register_device(THIS_MODULE, parent, info) |
| 108 | } | 108 | |
| 109 | extern void uio_unregister_device(struct uio_info *info); | 109 | extern void uio_unregister_device(struct uio_info *info); |
| 110 | extern void uio_event_notify(struct uio_info *info); | 110 | extern void uio_event_notify(struct uio_info *info); |
| 111 | 111 | ||
diff --git a/include/linux/usb.h b/include/linux/usb.h index 6f49a1b39fa6..d3d0c1374334 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
| @@ -946,10 +946,11 @@ struct usb_class_driver { | |||
| 946 | */ | 946 | */ |
| 947 | extern int usb_register_driver(struct usb_driver *, struct module *, | 947 | extern int usb_register_driver(struct usb_driver *, struct module *, |
| 948 | const char *); | 948 | const char *); |
| 949 | static inline int usb_register(struct usb_driver *driver) | 949 | |
| 950 | { | 950 | /* use a define to avoid include chaining to get THIS_MODULE & friends */ |
| 951 | return usb_register_driver(driver, THIS_MODULE, KBUILD_MODNAME); | 951 | #define usb_register(driver) \ |
| 952 | } | 952 | usb_register_driver(driver, THIS_MODULE, KBUILD_MODNAME) |
| 953 | |||
| 953 | extern void usb_deregister(struct usb_driver *); | 954 | extern void usb_deregister(struct usb_driver *); |
| 954 | 955 | ||
| 955 | extern int usb_register_device_driver(struct usb_device_driver *, | 956 | extern int usb_register_device_driver(struct usb_device_driver *, |
diff --git a/include/linux/uwb.h b/include/linux/uwb.h index b0c564ec2160..7dbbee9741b7 100644 --- a/include/linux/uwb.h +++ b/include/linux/uwb.h | |||
| @@ -33,6 +33,7 @@ | |||
| 33 | #include <linux/wait.h> | 33 | #include <linux/wait.h> |
| 34 | #include <linux/workqueue.h> | 34 | #include <linux/workqueue.h> |
| 35 | #include <linux/uwb/spec.h> | 35 | #include <linux/uwb/spec.h> |
| 36 | #include <asm/page.h> | ||
| 36 | 37 | ||
| 37 | struct uwb_dev; | 38 | struct uwb_dev; |
| 38 | struct uwb_beca_e; | 39 | struct uwb_beca_e; |
diff --git a/include/linux/uwb/umc.h b/include/linux/uwb/umc.h index 7b4842028ca7..891d1d5f3947 100644 --- a/include/linux/uwb/umc.h +++ b/include/linux/uwb/umc.h | |||
| @@ -111,10 +111,9 @@ int __must_check __umc_driver_register(struct umc_driver *umc_drv, | |||
| 111 | * umc_driver_register - register a UMC capabiltity driver. | 111 | * umc_driver_register - register a UMC capabiltity driver. |
| 112 | * @umc_drv: pointer to the driver. | 112 | * @umc_drv: pointer to the driver. |
| 113 | */ | 113 | */ |
| 114 | static inline int __must_check umc_driver_register(struct umc_driver *umc_drv) | 114 | #define umc_driver_register(umc_drv) \ |
| 115 | { | 115 | __umc_driver_register(umc_drv, THIS_MODULE, KBUILD_MODNAME) |
| 116 | return __umc_driver_register(umc_drv, THIS_MODULE, KBUILD_MODNAME); | 116 | |
| 117 | } | ||
| 118 | void umc_driver_unregister(struct umc_driver *umc_drv); | 117 | void umc_driver_unregister(struct umc_driver *umc_drv); |
| 119 | 118 | ||
| 120 | /* | 119 | /* |
diff --git a/include/linux/vermagic.h b/include/linux/vermagic.h index cf97b5b9d1fe..6f8fbcf10dfb 100644 --- a/include/linux/vermagic.h +++ b/include/linux/vermagic.h | |||
| @@ -1,5 +1,4 @@ | |||
| 1 | #include <generated/utsrelease.h> | 1 | #include <generated/utsrelease.h> |
| 2 | #include <linux/module.h> | ||
| 3 | 2 | ||
| 4 | /* Simply sanity version stamp for modules. */ | 3 | /* Simply sanity version stamp for modules. */ |
| 5 | #ifdef CONFIG_SMP | 4 | #ifdef CONFIG_SMP |
diff --git a/include/linux/vlynq.h b/include/linux/vlynq.h index 8f6a95882b09..017d4a53d55e 100644 --- a/include/linux/vlynq.h +++ b/include/linux/vlynq.h | |||
| @@ -20,9 +20,10 @@ | |||
| 20 | #define __VLYNQ_H__ | 20 | #define __VLYNQ_H__ |
| 21 | 21 | ||
| 22 | #include <linux/device.h> | 22 | #include <linux/device.h> |
| 23 | #include <linux/module.h> | ||
| 24 | #include <linux/types.h> | 23 | #include <linux/types.h> |
| 25 | 24 | ||
| 25 | struct module; | ||
| 26 | |||
| 26 | #define VLYNQ_NUM_IRQS 32 | 27 | #define VLYNQ_NUM_IRQS 32 |
| 27 | 28 | ||
| 28 | struct vlynq_mapping { | 29 | struct vlynq_mapping { |
