* '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
Showing the changes to include (55 of 2057 files). Show all
Unified · Split
| @@ -55,7 +55,6 @@ · 54 unmodified lines | ||
| 55 | 55 | |
| 56 | 56 | #include <linux/string.h> |
| 57 | 57 | #include <linux/kernel.h> |
| 58 | −#include <linux/module.h> | |
| 59 | 58 | #include <linux/ctype.h> |
| 60 | 59 | #include <linux/sched.h> |
| 61 | 60 | #include <asm/system.h> |
| @@ -42,7 +42,6 @@ · 41 unmodified lines | ||
| 42 | 42 | * can build the DRM (part of PI DRI). 4/21/2000 S + B */ |
| 43 | 43 | #include <asm/current.h> |
| 44 | 44 | #endif /* __alpha__ */ |
| 45 | −#include <linux/module.h> | |
| 46 | 45 | #include <linux/kernel.h> |
| 47 | 46 | #include <linux/miscdevice.h> |
| 48 | 47 | #include <linux/fs.h> |
| @@ -80,6 +79,8 @@ · 31 unmodified lines | ||
| 80 | 79 | #define __OS_HAS_AGP (defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) && defined(MODULE))) |
| 81 | 80 | #define __OS_HAS_MTRR (defined(CONFIG_MTRR)) |
| 82 | 81 | |
| 82 | +struct module; | |
| 83 | + | |
| 83 | 84 | struct drm_file; |
| 84 | 85 | struct drm_device; |
| 85 | 86 | |
| @@ -170,10 +170,9 @@ struct bcma_driver { · 169 unmodified lines | ||
| 170 | 170 | }; |
| 171 | 171 | extern |
| 172 | 172 | int __bcma_driver_register(struct bcma_driver *drv, struct module *owner); |
| 173 | −static inline int bcma_driver_register(struct bcma_driver *drv) | |
| 174 | −{ | |
| 175 | − return __bcma_driver_register(drv, THIS_MODULE); | |
| 176 | −} | |
| 173 | +#define bcma_driver_register(drv) \ | |
| 174 | + __bcma_driver_register(drv, THIS_MODULE) | |
| 175 | + | |
| 177 | 176 | extern void bcma_driver_unregister(struct bcma_driver *drv); |
| 178 | 177 | |
| 179 | 178 | struct bcma_bus { |
| @@ -14,7 +14,6 @@ · 13 unmodified lines | ||
| 14 | 14 | #include <linux/wait.h> |
| 15 | 15 | #include <linux/mempool.h> |
| 16 | 16 | #include <linux/bio.h> |
| 17 | −#include <linux/module.h> | |
| 18 | 17 | #include <linux/stringify.h> |
| 19 | 18 | #include <linux/gfp.h> |
| 20 | 19 | #include <linux/bsg.h> |
| @@ -22,6 +21,7 @@ · 1 unmodified line | ||
| 22 | 21 | |
| 23 | 22 | #include <asm/scatterlist.h> |
| 24 | 23 | |
| 24 | +struct module; | |
| 25 | 25 | struct scsi_ioctl_command; |
| 26 | 26 | |
| 27 | 27 | struct request_queue; |
| @@ -13,7 +13,6 @@ · 12 unmodified lines | ||
| 13 | 13 | |
| 14 | 14 | #include <linux/percpu.h> |
| 15 | 15 | #include <linux/list.h> |
| 16 | −#include <linux/module.h> | |
| 17 | 16 | #include <linux/kobject.h> |
| 18 | 17 | #include <linux/completion.h> |
| 19 | 18 | |
| @@ -21,6 +20,8 @@ · 1 unmodified line | ||
| 21 | 20 | #define CPUIDLE_NAME_LEN 16 |
| 22 | 21 | #define CPUIDLE_DESC_LEN 32 |
| 23 | 22 | |
| 23 | +struct module; | |
| 24 | + | |
| 24 | 25 | struct cpuidle_device; |
| 25 | 26 | |
| 26 | 27 | |
| @@ -18,7 +18,6 @@ · 17 unmodified lines | ||
| 18 | 18 | #define _LINUX_CRYPTO_H |
| 19 | 19 | |
| 20 | 20 | #include <linux/atomic.h> |
| 21 | −#include <linux/module.h> | |
| 22 | 21 | #include <linux/kernel.h> |
| 23 | 22 | #include <linux/list.h> |
| 24 | 23 | #include <linux/slab.h> |
| @@ -510,11 +509,6 @@ static inline int crypto_tfm_alg_priority(struct crypto_tfm *tfm) · 485 unmodified lines | ||
| 510 | 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 | 512 | static inline u32 crypto_tfm_alg_type(struct crypto_tfm *tfm) |
| 519 | 513 | { |
| 520 | 514 | return tfm->__crt_alg->cra_flags & CRYPTO_ALG_TYPE_MASK; |
| @@ -20,7 +20,7 @@ · 19 unmodified lines | ||
| 20 | 20 | #include <linux/lockdep.h> |
| 21 | 21 | #include <linux/compiler.h> |
| 22 | 22 | #include <linux/types.h> |
| 23 | −#include <linux/module.h> | |
| 23 | +#include <linux/mutex.h> | |
| 24 | 24 | #include <linux/pm.h> |
| 25 | 25 | #include <linux/atomic.h> |
| 26 | 26 | #include <asm/device.h> |
| @@ -29,6 +29,7 @@ struct device; · 2 unmodified lines | ||
| 29 | 29 | struct device_private; |
| 30 | 30 | struct device_driver; |
| 31 | 31 | struct driver_private; |
| 32 | +struct module; | |
| 32 | 33 | struct class; |
| 33 | 34 | struct subsys_private; |
| 34 | 35 | struct bus_type; |
| @@ -723,10 +724,14 @@ extern int dev_set_drvdata(struct device *dev, void *data); · 688 unmodified lines | ||
| 723 | 724 | */ |
| 724 | 725 | extern struct device *__root_device_register(const char *name, |
| 725 | 726 | struct module *owner); |
| 726 | −static inline struct device *root_device_register(const char *name) | |
| 727 | −{ | |
| 728 | − return __root_device_register(name, THIS_MODULE); | |
| 729 | −} | |
| 727 | + | |
| 728 | +/* | |
| 729 | + * This is a macro to avoid include problems with THIS_MODULE, | |
| 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 | 735 | extern void root_device_unregister(struct device *root); |
| 731 | 736 | |
| 732 | 737 | static inline void *dev_get_platdata(const struct device *dev) |
| @@ -1,4 +1,3 @@ | ||
| 1 | −#include <linux/module.h> | |
| 2 | 1 | #include <linux/fs.h> |
| 3 | 2 | |
| 4 | 3 | #ifdef CONFIG_CGROUP_DEVICE |
| @@ -25,6 +25,8 @@ · 24 unmodified lines | ||
| 25 | 25 | #include <linux/uio.h> |
| 26 | 26 | #include <linux/dma-direction.h> |
| 27 | 27 | #include <linux/scatterlist.h> |
| 28 | +#include <linux/bitmap.h> | |
| 29 | +#include <asm/page.h> | |
| 28 | 30 | |
| 29 | 31 | /** |
| 30 | 32 | * typedef dma_cookie_t - an opaque DMA cookie |
| @@ -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 */ | |
| @@ -1,7 +1,6 @@ | ||
| 1 | 1 | #ifndef _LINUX_FIRMWARE_H |
| 2 | 2 | #define _LINUX_FIRMWARE_H |
| 3 | 3 | |
| 4 | −#include <linux/module.h> | |
| 5 | 4 | #include <linux/types.h> |
| 6 | 5 | #include <linux/compiler.h> |
| 7 | 6 | #include <linux/gfp.h> |
| @@ -15,6 +14,7 @@ struct firmware { · 7 unmodified lines | ||
| 15 | 14 | struct page **pages; |
| 16 | 15 | }; |
| 17 | 16 | |
| 17 | +struct module; | |
| 18 | 18 | struct device; |
| 19 | 19 | |
| 20 | 20 | struct builtin_fw { |
| @@ -10,7 +10,6 @@ · 9 unmodified lines | ||
| 10 | 10 | #include <linux/kallsyms.h> |
| 11 | 11 | #include <linux/linkage.h> |
| 12 | 12 | #include <linux/bitops.h> |
| 13 | −#include <linux/module.h> | |
| 14 | 13 | #include <linux/ktime.h> |
| 15 | 14 | #include <linux/sched.h> |
| 16 | 15 | #include <linux/types.h> |
| @@ -19,6 +18,7 @@ · 2 unmodified lines | ||
| 19 | 18 | |
| 20 | 19 | #include <asm/ftrace.h> |
| 21 | 20 | |
| 21 | +struct module; | |
| 22 | 22 | struct ftrace_hash; |
| 23 | 23 | |
| 24 | 24 | #ifdef CONFIG_FUNCTION_TRACER |
| @@ -71,10 +71,9 @@ void gameport_close(struct gameport *gameport); · 70 unmodified lines | ||
| 71 | 71 | #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE)) |
| 72 | 72 | |
| 73 | 73 | void __gameport_register_port(struct gameport *gameport, struct module *owner); |
| 74 | −static inline void gameport_register_port(struct gameport *gameport) | |
| 75 | −{ | |
| 76 | − __gameport_register_port(gameport, THIS_MODULE); | |
| 77 | −} | |
| 74 | +/* use a define to avoid include chaining to get THIS_MODULE */ | |
| 75 | +#define gameport_register_port(gameport) \ | |
| 76 | + __gameport_register_port(gameport, THIS_MODULE) | |
| 78 | 77 | |
| 79 | 78 | void gameport_unregister_port(struct gameport *gameport); |
| 80 | 79 | |
| @@ -145,12 +144,12 @@ static inline void gameport_unpin_driver(struct gameport *gameport) · 64 unmodified lines | ||
| 145 | 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 | 148 | struct module *owner, const char *mod_name); |
| 150 | −static inline int __must_check gameport_register_driver(struct gameport_driver *drv) | |
| 151 | −{ | |
| 152 | − return __gameport_register_driver(drv, THIS_MODULE, KBUILD_MODNAME); | |
| 153 | −} | |
| 149 | + | |
| 150 | +/* use a define to avoid include chaining to get THIS_MODULE & friends */ | |
| 151 | +#define gameport_register_driver(drv) \ | |
| 152 | + __gameport_register_driver(drv, THIS_MODULE, KBUILD_MODNAME) | |
| 154 | 153 | |
| 155 | 154 | void gameport_unregister_driver(struct gameport_driver *drv); |
| 156 | 155 | |
| @@ -697,10 +697,11 @@ extern void hid_destroy_device(struct hid_device *); · 696 unmodified lines | ||
| 697 | 697 | |
| 698 | 698 | extern int __must_check __hid_register_driver(struct hid_driver *, |
| 699 | 699 | struct module *, const char *mod_name); |
| 700 | −static inline int __must_check hid_register_driver(struct hid_driver *driver) | |
| 701 | −{ | |
| 702 | − return __hid_register_driver(driver, THIS_MODULE, KBUILD_MODNAME); | |
| 703 | −} | |
| 700 | + | |
| 701 | +/* use a define to avoid include chaining to get THIS_MODULE & friends */ | |
| 702 | +#define hid_register_driver(driver) \ | |
| 703 | + __hid_register_driver(driver, THIS_MODULE, KBUILD_MODNAME) | |
| 704 | + | |
| 704 | 705 | extern void hid_unregister_driver(struct hid_driver *); |
| 705 | 706 | |
| 706 | 707 | extern void hidinput_hid_event(struct hid_device *, struct hid_field *, struct hid_usage *, __s32); |
| @@ -28,7 +28,6 @@ · 27 unmodified lines | ||
| 28 | 28 | |
| 29 | 29 | #include <linux/types.h> |
| 30 | 30 | #ifdef __KERNEL__ |
| 31 | −#include <linux/module.h> | |
| 32 | 31 | #include <linux/mod_devicetable.h> |
| 33 | 32 | #include <linux/device.h> /* for struct device */ |
| 34 | 33 | #include <linux/sched.h> /* for completion */ |
| @@ -49,6 +48,8 @@ struct i2c_driver; · 14 unmodified lines | ||
| 49 | 48 | union i2c_smbus_data; |
| 50 | 49 | struct i2c_board_info; |
| 51 | 50 | |
| 51 | +struct module; | |
| 52 | + | |
| 52 | 53 | #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) |
| 53 | 54 | /* |
| 54 | 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 *); · 396 unmodified lines | ||
| 451 | 452 | extern int i2c_register_driver(struct module *, struct i2c_driver *); |
| 452 | 453 | extern void i2c_del_driver(struct i2c_driver *); |
| 453 | 454 | |
| 454 | −static inline int i2c_add_driver(struct i2c_driver *driver) | |
| 455 | −{ | |
| 456 | − return i2c_register_driver(THIS_MODULE, driver); | |
| 457 | −} | |
| 455 | +/* use a define to avoid include chaining to get THIS_MODULE */ | |
| 456 | +#define i2c_add_driver(driver) \ | |
| 457 | + i2c_register_driver(THIS_MODULE, driver) | |
| 458 | 458 | |
| 459 | 459 | extern struct i2c_client *i2c_use_client(struct i2c_client *client); |
| 460 | 460 | extern void i2c_release_client(struct i2c_client *client); |
| @@ -220,10 +220,11 @@ struct kernel_ipmi_msg { · 219 unmodified lines | ||
| 220 | 220 | * The in-kernel interface. |
| 221 | 221 | */ |
| 222 | 222 | #include <linux/list.h> |
| 223 | −#include <linux/module.h> | |
| 224 | 223 | #include <linux/device.h> |
| 225 | 224 | #include <linux/proc_fs.h> |
| 226 | 225 | |
| 226 | +struct module; | |
| 227 | + | |
| 227 | 228 | /* Opaque type for a IPMI message user. One of these is needed to |
| 228 | 229 | send and receive messages. */ |
| 229 | 230 | typedef struct ipmi_user *ipmi_user_t; |
| @@ -36,7 +36,6 @@ · 35 unmodified lines | ||
| 36 | 36 | |
| 37 | 37 | #include <linux/ipmi_msgdefs.h> |
| 38 | 38 | #include <linux/proc_fs.h> |
| 39 | −#include <linux/module.h> | |
| 40 | 39 | #include <linux/device.h> |
| 41 | 40 | #include <linux/platform_device.h> |
| 42 | 41 | #include <linux/ipmi.h> |
| @@ -23,13 +23,13 @@ · 22 unmodified lines | ||
| 23 | 23 | #include <linux/errno.h> |
| 24 | 24 | #include <linux/topology.h> |
| 25 | 25 | #include <linux/wait.h> |
| 26 | −#include <linux/module.h> | |
| 27 | 26 | |
| 28 | 27 | #include <asm/irq.h> |
| 29 | 28 | #include <asm/ptrace.h> |
| 30 | 29 | #include <asm/irq_regs.h> |
| 31 | 30 | |
| 32 | 31 | struct seq_file; |
| 32 | +struct module; | |
| 33 | 33 | struct irq_desc; |
| 34 | 34 | struct irq_data; |
| 35 | 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) · 531 unmodified lines | ||
| 567 | 567 | int __irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node, |
| 568 | 568 | struct module *owner); |
| 569 | 569 | |
| 570 | −static inline int irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, | |
| 571 | − int node) | |
| 572 | −{ | |
| 573 | − return __irq_alloc_descs(irq, from, cnt, node, THIS_MODULE); | |
| 574 | −} | |
| 570 | +/* use macros to avoid needing export.h for THIS_MODULE */ | |
| 571 | +#define irq_alloc_descs(irq, from, cnt, node) \ | |
| 572 | + __irq_alloc_descs(irq, from, cnt, node, THIS_MODULE) | |
| 575 | 573 | |
| 576 | −void irq_free_descs(unsigned int irq, unsigned int cnt); | |
| 577 | −int irq_reserve_irqs(unsigned int from, unsigned int cnt); | |
| 574 | +#define irq_alloc_desc(node) \ | |
| 575 | + irq_alloc_descs(-1, 0, 1, node) | |
| 578 | 576 | |
| 579 | −static inline int irq_alloc_desc(int node) | |
| 580 | −{ | |
| 581 | − return irq_alloc_descs(-1, 0, 1, node); | |
| 582 | −} | |
| 577 | +#define irq_alloc_desc_at(at, node) \ | |
| 578 | + irq_alloc_descs(at, at, 1, node) | |
| 583 | 579 | |
| 584 | −static inline int irq_alloc_desc_at(unsigned int at, int node) | |
| 585 | −{ | |
| 586 | − return irq_alloc_descs(at, at, 1, node); | |
| 587 | −} | |
| 580 | +#define irq_alloc_desc_from(from, node) \ | |
| 581 | + irq_alloc_descs(-1, from, 1, node) | |
| 588 | 582 | |
| 589 | −static inline int irq_alloc_desc_from(unsigned int from, int node) | |
| 590 | −{ | |
| 591 | − return irq_alloc_descs(-1, from, 1, node); | |
| 592 | −} | |
| 583 | +void irq_free_descs(unsigned int irq, unsigned int cnt); | |
| 584 | +int irq_reserve_irqs(unsigned int from, unsigned int cnt); | |
| 593 | 585 | |
| 594 | 586 | static inline void irq_free_desc(unsigned int irq) |
| 595 | 587 | { |
| @@ -11,6 +11,7 @@ · 10 unmodified lines | ||
| 11 | 11 | struct irq_affinity_notify; |
| 12 | 12 | struct proc_dir_entry; |
| 13 | 13 | struct timer_rand_state; |
| 14 | +struct module; | |
| 14 | 15 | /** |
| 15 | 16 | * struct irq_desc - interrupt descriptor |
| 16 | 17 | * @irq_data: per irq and chip data passed down to chip functions |
| @@ -2,7 +2,8 @@ · 1 unmodified line | ||
| 2 | 2 | #define __LINUX_MDIO_BITBANG_H |
| 3 | 3 | |
| 4 | 4 | #include <linux/phy.h> |
| 5 | −#include <linux/module.h> | |
| 5 | + | |
| 6 | +struct module; | |
| 6 | 7 | |
| 7 | 8 | struct mdiobb_ctrl; |
| 8 | 9 | |
| @@ -1,7 +1,8 @@ | ||
| 1 | 1 | #ifndef _LINUX_MISCDEVICE_H |
| 2 | 2 | #define _LINUX_MISCDEVICE_H |
| 3 | −#include <linux/module.h> | |
| 4 | 3 | #include <linux/major.h> |
| 4 | +#include <linux/list.h> | |
| 5 | +#include <linux/types.h> | |
| 5 | 6 | |
| 6 | 7 | /* |
| 7 | 8 | * These allocations are managed by device@lanana.org. If you use an |
| @@ -16,6 +16,7 @@ · 15 unmodified lines | ||
| 16 | 16 | #include <linux/kobject.h> |
| 17 | 17 | #include <linux/moduleparam.h> |
| 18 | 18 | #include <linux/tracepoint.h> |
| 19 | +#include <linux/export.h> | |
| 19 | 20 | |
| 20 | 21 | #include <linux/percpu.h> |
| 21 | 22 | #include <asm/module.h> |
| @@ -25,21 +26,8 @@ · 3 unmodified lines | ||
| 25 | 26 | /* Not Yet Implemented */ |
| 26 | 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 | 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 | 31 | struct modversion_info |
| 44 | 32 | { |
| 45 | 33 | unsigned long crc; |
| @@ -98,11 +86,8 @@ void trim_init_extable(struct module *m); · 52 unmodified lines | ||
| 98 | 86 | extern const struct gtype##_id __mod_##gtype##_table \ |
| 99 | 87 | __attribute__ ((unused, alias(__stringify(name)))) |
| 100 | 88 | |
| 101 | −extern struct module __this_module; | |
| 102 | −#define THIS_MODULE (&__this_module) | |
| 103 | 89 | #else /* !MODULE */ |
| 104 | 90 | #define MODULE_GENERIC_TABLE(gtype,name) |
| 105 | −#define THIS_MODULE ((struct module *)0) | |
| 106 | 91 | #endif |
| 107 | 92 | |
| 108 | 93 | /* Generic info of form tag = "info" */ |
| @@ -150,11 +135,6 @@ extern struct module __this_module; · 41 unmodified lines | ||
| 150 | 135 | /* What your module does. */ |
| 151 | 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 | 138 | #define MODULE_DEVICE_TABLE(type,name) \ |
| 159 | 139 | MODULE_GENERIC_TABLE(type##_device,name) |
| 160 | 140 | |
| @@ -218,52 +198,6 @@ struct module_use { · 57 unmodified lines | ||
| 218 | 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 | 201 | enum module_state |
| 268 | 202 | { |
| 269 | 203 | MODULE_STATE_LIVE, |
| @@ -581,11 +515,6 @@ int unregister_module_notifier(struct notifier_block * nb); · 311 unmodified lines | ||
| 581 | 515 | extern void print_modules(void); |
| 582 | 516 | |
| 583 | 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 | 519 | /* Given an address, look for it in the exception tables. */ |
| 591 | 520 | static inline const struct exception_table_entry * |
| @@ -31,6 +31,11 @@ static const char __module_cat(name,__LINE__)[] \ · 30 unmodified lines | ||
| 31 | 31 | #define __MODULE_PARM_TYPE(name, _type) \ |
| 32 | 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 | 39 | struct kernel_param; |
| 35 | 40 | |
| 36 | 41 | struct kernel_param_ops { |
| @@ -21,7 +21,6 @@ · 20 unmodified lines | ||
| 21 | 21 | #define __MTD_MTD_H__ |
| 22 | 22 | |
| 23 | 23 | #include <linux/types.h> |
| 24 | −#include <linux/module.h> | |
| 25 | 24 | #include <linux/uio.h> |
| 26 | 25 | #include <linux/notifier.h> |
| 27 | 26 | #include <linux/device.h> |
| @@ -125,6 +124,8 @@ struct nand_ecclayout { · 97 unmodified lines | ||
| 125 | 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 | 129 | struct mtd_info { |
| 129 | 130 | u_char type; |
| 130 | 131 | uint32_t flags; |
| @@ -23,6 +23,7 @@ · 22 unmodified lines | ||
| 23 | 23 | #include <linux/spinlock.h> |
| 24 | 24 | |
| 25 | 25 | #include <asm/byteorder.h> |
| 26 | +#include <asm/errno.h> | |
| 26 | 27 | |
| 27 | 28 | typedef u32 phandle; |
| 28 | 29 | typedef u32 ihandle; |
| @@ -12,7 +12,6 @@ · 11 unmodified lines | ||
| 12 | 12 | */ |
| 13 | 13 | |
| 14 | 14 | #ifdef CONFIG_OF_DEVICE |
| 15 | −#include <linux/module.h> | |
| 16 | 15 | #include <linux/device.h> |
| 17 | 16 | #include <linux/mod_devicetable.h> |
| 18 | 17 | #include <linux/pm.h> |
| @@ -132,13 +132,9 @@ extern int pci_hp_deregister(struct hotplug_slot *slot); · 131 unmodified lines | ||
| 132 | 132 | extern int __must_check pci_hp_change_slot_info (struct hotplug_slot *slot, |
| 133 | 133 | struct hotplug_slot_info *info); |
| 134 | 134 | |
| 135 | −static inline int pci_hp_register(struct hotplug_slot *slot, | |
| 136 | − struct pci_bus *pbus, | |
| 137 | − int devnr, const char *name) | |
| 138 | −{ | |
| 139 | − return __pci_hp_register(slot, pbus, devnr, name, | |
| 140 | − THIS_MODULE, KBUILD_MODNAME); | |
| 141 | −} | |
| 135 | +/* use a define to avoid include chaining to get THIS_MODULE & friends */ | |
| 136 | +#define pci_hp_register(slot, pbus, devnr, name) \ | |
| 137 | + __pci_hp_register(slot, pbus, devnr, name, THIS_MODULE, KBUILD_MODNAME) | |
| 142 | 138 | |
| 143 | 139 | /* PCI Setting Record (Type 0) */ |
| 144 | 140 | struct hpp_type0 { |
| @@ -10,6 +10,7 @@ · 9 unmodified lines | ||
| 10 | 10 | #define _LINUX_PM_RUNTIME_H |
| 11 | 11 | |
| 12 | 12 | #include <linux/device.h> |
| 13 | +#include <linux/notifier.h> | |
| 13 | 14 | #include <linux/pm.h> |
| 14 | 15 | |
| 15 | 16 | #include <linux/jiffies.h> |
| @@ -15,8 +15,8 @@ · 14 unmodified lines | ||
| 15 | 15 | |
| 16 | 16 | #include <linux/device.h> |
| 17 | 17 | #include <linux/list.h> |
| 18 | −#include <linux/module.h> | |
| 19 | 18 | |
| 19 | +struct module; | |
| 20 | 20 | struct i2c_client; |
| 21 | 21 | struct spi_device; |
| 22 | 22 | |
| @@ -16,6 +16,7 @@ · 15 unmodified lines | ||
| 16 | 16 | #define __LINUX_REGULATOR_DRIVER_H_ |
| 17 | 17 | |
| 18 | 18 | #include <linux/device.h> |
| 19 | +#include <linux/notifier.h> | |
| 19 | 20 | #include <linux/regulator/consumer.h> |
| 20 | 21 | |
| 21 | 22 | struct regulator_dev; |
| @@ -79,19 +79,21 @@ void serio_reconnect(struct serio *serio); · 78 unmodified lines | ||
| 79 | 79 | irqreturn_t serio_interrupt(struct serio *serio, unsigned char data, unsigned int flags); |
| 80 | 80 | |
| 81 | 81 | void __serio_register_port(struct serio *serio, struct module *owner); |
| 82 | −static inline void serio_register_port(struct serio *serio) | |
| 83 | −{ | |
| 84 | − __serio_register_port(serio, THIS_MODULE); | |
| 85 | −} | |
| 82 | + | |
| 83 | +/* use a define to avoid include chaining to get THIS_MODULE */ | |
| 84 | +#define serio_register_port(serio) \ | |
| 85 | + __serio_register_port(serio, THIS_MODULE) | |
| 86 | 86 | |
| 87 | 87 | void serio_unregister_port(struct serio *serio); |
| 88 | 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); | |
| 91 | −static inline int __must_check serio_register_driver(struct serio_driver *drv) | |
| 92 | −{ | |
| 93 | − return __serio_register_driver(drv, THIS_MODULE, KBUILD_MODNAME); | |
| 94 | −} | |
| 90 | +int __must_check __serio_register_driver(struct serio_driver *drv, | |
| 91 | + struct module *owner, const char *mod_name); | |
| 92 | + | |
| 93 | +/* use a define to avoid include chaining to get THIS_MODULE & friends */ | |
| 94 | +#define serio_register_driver(drv) \ | |
| 95 | + __serio_register_driver(drv, THIS_MODULE, KBUILD_MODNAME) | |
| 96 | + | |
| 95 | 97 | void serio_unregister_driver(struct serio_driver *drv); |
| 96 | 98 | |
| 97 | 99 | static inline int serio_write(struct serio *serio, unsigned char data) |
| @@ -231,10 +231,9 @@ struct ssb_driver { · 230 unmodified lines | ||
| 231 | 231 | #define drv_to_ssb_drv(_drv) container_of(_drv, struct ssb_driver, drv) |
| 232 | 232 | |
| 233 | 233 | extern int __ssb_driver_register(struct ssb_driver *drv, struct module *owner); |
| 234 | −static inline int ssb_driver_register(struct ssb_driver *drv) | |
| 235 | −{ | |
| 236 | − return __ssb_driver_register(drv, THIS_MODULE); | |
| 237 | −} | |
| 234 | +#define ssb_driver_register(drv) \ | |
| 235 | + __ssb_driver_register(drv, THIS_MODULE) | |
| 236 | + | |
| 238 | 237 | extern void ssb_driver_unregister(struct ssb_driver *drv); |
| 239 | 238 | |
| 240 | 239 | |
| @@ -3,6 +3,7 @@ · 2 unmodified lines | ||
| 3 | 3 | |
| 4 | 4 | #include <linux/cpu.h> |
| 5 | 5 | #include <linux/cpumask.h> |
| 6 | +#include <linux/smp.h> | |
| 6 | 7 | #include <linux/list.h> |
| 7 | 8 | #include <asm/system.h> |
| 8 | 9 | |
| @@ -8,7 +8,8 @@ · 7 unmodified lines | ||
| 8 | 8 | #define SUNRPC_SVC_XPRT_H |
| 9 | 9 | |
| 10 | 10 | #include <linux/sunrpc/svc.h> |
| 11 | −#include <linux/module.h> | |
| 11 | + | |
| 12 | +struct module; | |
| 12 | 13 | |
| 13 | 14 | struct svc_xprt_ops { |
| 14 | 15 | struct svc_xprt *(*xpo_create)(struct svc_serv *, |
| @@ -22,7 +22,6 @@ · 21 unmodified lines | ||
| 22 | 22 | #define _SYSDEV_H_ |
| 23 | 23 | |
| 24 | 24 | #include <linux/kobject.h> |
| 25 | −#include <linux/module.h> | |
| 26 | 25 | #include <linux/pm.h> |
| 27 | 26 | |
| 28 | 27 | |
| @@ -4,10 +4,11 @@ · 3 unmodified lines | ||
| 4 | 4 | #include <linux/types.h> |
| 5 | 5 | #include <linux/list.h> |
| 6 | 6 | #include <linux/kernel.h> |
| 7 | −#include <linux/module.h> | |
| 8 | 7 | #include <linux/err.h> |
| 9 | 8 | #include <linux/slab.h> |
| 10 | 9 | |
| 10 | +struct module; | |
| 11 | + | |
| 11 | 12 | struct ts_config; |
| 12 | 13 | |
| 13 | 14 | #define TS_AUTOLOAD 1 /* Automatically load textsearch modules when needed */ |
| @@ -14,10 +14,10 @@ · 13 unmodified lines | ||
| 14 | 14 | #ifndef _UIO_DRIVER_H_ |
| 15 | 15 | #define _UIO_DRIVER_H_ |
| 16 | 16 | |
| 17 | −#include <linux/module.h> | |
| 18 | 17 | #include <linux/fs.h> |
| 19 | 18 | #include <linux/interrupt.h> |
| 20 | 19 | |
| 20 | +struct module; | |
| 21 | 21 | struct uio_map; |
| 22 | 22 | |
| 23 | 23 | /** |
| @@ -101,11 +101,11 @@ extern int __must_check · 77 unmodified lines | ||
| 101 | 101 | __uio_register_device(struct module *owner, |
| 102 | 102 | struct device *parent, |
| 103 | 103 | struct uio_info *info); |
| 104 | −static inline int __must_check | |
| 105 | − uio_register_device(struct device *parent, struct uio_info *info) | |
| 106 | −{ | |
| 107 | − return __uio_register_device(THIS_MODULE, parent, info); | |
| 108 | −} | |
| 104 | + | |
| 105 | +/* use a define to avoid include chaining to get THIS_MODULE */ | |
| 106 | +#define uio_register_device(parent, info) \ | |
| 107 | + __uio_register_device(THIS_MODULE, parent, info) | |
| 108 | + | |
| 109 | 109 | extern void uio_unregister_device(struct uio_info *info); |
| 110 | 110 | extern void uio_event_notify(struct uio_info *info); |
| 111 | 111 | |
| @@ -946,10 +946,11 @@ struct usb_class_driver { · 945 unmodified lines | ||
| 946 | 946 | */ |
| 947 | 947 | extern int usb_register_driver(struct usb_driver *, struct module *, |
| 948 | 948 | const char *); |
| 949 | −static inline int usb_register(struct usb_driver *driver) | |
| 950 | −{ | |
| 951 | − return usb_register_driver(driver, THIS_MODULE, KBUILD_MODNAME); | |
| 952 | −} | |
| 949 | + | |
| 950 | +/* use a define to avoid include chaining to get THIS_MODULE & friends */ | |
| 951 | +#define usb_register(driver) \ | |
| 952 | + usb_register_driver(driver, THIS_MODULE, KBUILD_MODNAME) | |
| 953 | + | |
| 953 | 954 | extern void usb_deregister(struct usb_driver *); |
| 954 | 955 | |
| 955 | 956 | extern int usb_register_device_driver(struct usb_device_driver *, |
| @@ -33,6 +33,7 @@ · 32 unmodified lines | ||
| 33 | 33 | #include <linux/wait.h> |
| 34 | 34 | #include <linux/workqueue.h> |
| 35 | 35 | #include <linux/uwb/spec.h> |
| 36 | +#include <asm/page.h> | |
| 36 | 37 | |
| 37 | 38 | struct uwb_dev; |
| 38 | 39 | struct uwb_beca_e; |
| @@ -111,10 +111,9 @@ int __must_check __umc_driver_register(struct umc_driver *umc_drv, · 110 unmodified lines | ||
| 111 | 111 | * umc_driver_register - register a UMC capabiltity driver. |
| 112 | 112 | * @umc_drv: pointer to the driver. |
| 113 | 113 | */ |
| 114 | −static inline int __must_check umc_driver_register(struct umc_driver *umc_drv) | |
| 115 | −{ | |
| 116 | − return __umc_driver_register(umc_drv, THIS_MODULE, KBUILD_MODNAME); | |
| 117 | −} | |
| 114 | +#define umc_driver_register(umc_drv) \ | |
| 115 | + __umc_driver_register(umc_drv, THIS_MODULE, KBUILD_MODNAME) | |
| 116 | + | |
| 118 | 117 | void umc_driver_unregister(struct umc_driver *umc_drv); |
| 119 | 118 | |
| 120 | 119 | /* |
| @@ -1,5 +1,4 @@ | ||
| 1 | 1 | #include <generated/utsrelease.h> |
| 2 | −#include <linux/module.h> | |
| 3 | 2 | |
| 4 | 3 | /* Simply sanity version stamp for modules. */ |
| 5 | 4 | #ifdef CONFIG_SMP |
| @@ -20,9 +20,10 @@ · 19 unmodified lines | ||
| 20 | 20 | #define __VLYNQ_H__ |
| 21 | 21 | |
| 22 | 22 | #include <linux/device.h> |
| 23 | −#include <linux/module.h> | |
| 24 | 23 | #include <linux/types.h> |
| 25 | 24 | |
| 25 | +struct module; | |
| 26 | + | |
| 26 | 27 | #define VLYNQ_NUM_IRQS 32 |
| 27 | 28 | |
| 28 | 29 | struct vlynq_mapping { |
| @@ -1,7 +1,6 @@ | ||
| 1 | 1 | #ifndef __SAA7146__ |
| 2 | 2 | #define __SAA7146__ |
| 3 | 3 | |
| 4 | −#include <linux/module.h> /* for module-version */ | |
| 5 | 4 | #include <linux/delay.h> /* for delay-stuff */ |
| 6 | 5 | #include <linux/slab.h> /* for kmalloc/kfree */ |
| 7 | 6 | #include <linux/pci.h> /* for pci-config-stuff, vendor ids etc. */ |
| @@ -55,6 +54,8 @@ do { \ · 47 unmodified lines | ||
| 55 | 54 | #define SAA7146_ISR_CLEAR(x,y) \ |
| 56 | 55 | saa7146_write(x, ISR, (y)); |
| 57 | 56 | |
| 57 | +struct module; | |
| 58 | + | |
| 58 | 59 | struct saa7146_dev; |
| 59 | 60 | struct saa7146_extension; |
| 60 | 61 | struct saa7146_vv; |
| @@ -25,7 +25,6 @@ · 24 unmodified lines | ||
| 25 | 25 | #ifndef V4L2_INT_DEVICE_H |
| 26 | 26 | #define V4L2_INT_DEVICE_H |
| 27 | 27 | |
| 28 | −#include <linux/module.h> | |
| 29 | 28 | #include <media/v4l2-common.h> |
| 30 | 29 | |
| 31 | 30 | #define V4L2NAMESIZE 32 |
| @@ -41,6 +40,8 @@ enum v4l2_int_type { · 9 unmodified lines | ||
| 41 | 40 | v4l2_int_type_slave |
| 42 | 41 | }; |
| 43 | 42 | |
| 43 | +struct module; | |
| 44 | + | |
| 44 | 45 | struct v4l2_int_device; |
| 45 | 46 | |
| 46 | 47 | struct v4l2_int_master { |
| @@ -513,11 +513,15 @@ static inline void __hci_dev_put(struct hci_dev *d) · 512 unmodified lines | ||
| 513 | 513 | d->destruct(d); |
| 514 | 514 | } |
| 515 | 515 | |
| 516 | −static inline void hci_dev_put(struct hci_dev *d) | |
| 517 | −{ | |
| 518 | − __hci_dev_put(d); | |
| 519 | − module_put(d->owner); | |
| 520 | −} | |
| 516 | +/* | |
| 517 | + * hci_dev_put and hci_dev_hold are macros to avoid dragging all the | |
| 518 | + * overhead of all the modular infrastructure into this header. | |
| 519 | + */ | |
| 520 | +#define hci_dev_put(d) \ | |
| 521 | +do { \ | |
| 522 | + __hci_dev_put(d); \ | |
| 523 | + module_put(d->owner); \ | |
| 524 | +} while (0) | |
| 521 | 525 | |
| 522 | 526 | static inline struct hci_dev *__hci_dev_hold(struct hci_dev *d) |
| 523 | 527 | { |
| @@ -525,12 +529,10 @@ static inline struct hci_dev *__hci_dev_hold(struct hci_dev *d) · 1 unmodified line | ||
| 525 | 529 | return d; |
| 526 | 530 | } |
| 527 | 531 | |
| 528 | −static inline struct hci_dev *hci_dev_hold(struct hci_dev *d) | |
| 529 | −{ | |
| 530 | − if (try_module_get(d->owner)) | |
| 531 | − return __hci_dev_hold(d); | |
| 532 | − return NULL; | |
| 533 | −} | |
| 532 | +#define hci_dev_hold(d) \ | |
| 533 | +({ \ | |
| 534 | + try_module_get(d->owner) ? __hci_dev_hold(d) : NULL; \ | |
| 535 | +}) | |
| 534 | 536 | |
| 535 | 537 | #define hci_dev_lock(d) spin_lock(&d->lock) |
| 536 | 538 | #define hci_dev_unlock(d) spin_unlock(&d->lock) |
| @@ -18,7 +18,6 @@ · 17 unmodified lines | ||
| 18 | 18 | |
| 19 | 19 | #include <linux/kmemcheck.h> |
| 20 | 20 | #include <linux/list.h> |
| 21 | −#include <linux/module.h> | |
| 22 | 21 | #include <linux/timer.h> |
| 23 | 22 | #include <linux/types.h> |
| 24 | 23 | #include <linux/workqueue.h> |
| @@ -1126,17 +1126,16 @@ int unregister_ip_vs_pe(struct ip_vs_pe *pe); · 1125 unmodified lines | ||
| 1126 | 1126 | struct ip_vs_pe *ip_vs_pe_getbyname(const char *name); |
| 1127 | 1127 | struct ip_vs_pe *__ip_vs_pe_getbyname(const char *pe_name); |
| 1128 | 1128 | |
| 1129 | −static inline void ip_vs_pe_get(const struct ip_vs_pe *pe) | |
| 1130 | −{ | |
| 1131 | − if (pe && pe->module) | |
| 1129 | +/* | |
| 1130 | + * Use a #define to avoid all of module.h just for these trivial ops | |
| 1131 | + */ | |
| 1132 | +#define ip_vs_pe_get(pe) \ | |
| 1133 | + if (pe && pe->module) \ | |
| 1132 | 1134 | __module_get(pe->module); |
| 1133 | −} | |
| 1134 | 1135 | |
| 1135 | −static inline void ip_vs_pe_put(const struct ip_vs_pe *pe) | |
| 1136 | −{ | |
| 1137 | − if (pe && pe->module) | |
| 1136 | +#define ip_vs_pe_put(pe) \ | |
| 1137 | + if (pe && pe->module) \ | |
| 1138 | 1138 | module_put(pe->module); |
| 1139 | −} | |
| 1140 | 1139 | |
| 1141 | 1140 | /* |
| 1142 | 1141 | * IPVS protocol functions (from ip_vs_proto.c) |
| @@ -25,7 +25,6 @@ · 24 unmodified lines | ||
| 25 | 25 | |
| 26 | 26 | #include <linux/types.h> |
| 27 | 27 | #include <linux/list.h> |
| 28 | −#include <linux/module.h> | |
| 29 | 28 | #include <linux/atomic.h> |
| 30 | 29 | #include <linux/if.h> |
| 31 | 30 | #include <linux/skbuff.h> |
| @@ -42,6 +41,8 @@ enum { · 10 unmodified lines | ||
| 42 | 41 | IEEE80211_CRYPTO_TKIP_COUNTERMEASURES = (1 << 0), |
| 43 | 42 | }; |
| 44 | 43 | |
| 44 | +struct module; | |
| 45 | + | |
| 45 | 46 | struct lib80211_crypto_ops { |
| 46 | 47 | const char *name; |
| 47 | 48 | struct list_head list; |
| @@ -313,6 +313,8 @@ static inline bool nf_is_loopback_packet(const struct sk_buff *skb) · 312 unmodified lines | ||
| 313 | 313 | return skb->dev && skb->skb_iif && skb->dev->flags & IFF_LOOPBACK; |
| 314 | 314 | } |
| 315 | 315 | |
| 316 | +struct kernel_param; | |
| 317 | + | |
| 316 | 318 | extern int nf_conntrack_set_hashsize(const char *val, struct kernel_param *kp); |
| 317 | 319 | extern unsigned int nf_conntrack_htable_size; |
| 318 | 320 | extern unsigned int nf_conntrack_max; |
| @@ -4,7 +4,6 @@ · 3 unmodified lines | ||
| 4 | 4 | #include <linux/netdevice.h> |
| 5 | 5 | #include <linux/types.h> |
| 6 | 6 | #include <linux/rcupdate.h> |
| 7 | −#include <linux/module.h> | |
| 8 | 7 | #include <linux/pkt_sched.h> |
| 9 | 8 | #include <linux/pkt_cls.h> |
| 10 | 9 | #include <net/gen_stats.h> |
| @@ -46,7 +46,6 @@ · 45 unmodified lines | ||
| 46 | 46 | #include <linux/list_nulls.h> |
| 47 | 47 | #include <linux/timer.h> |
| 48 | 48 | #include <linux/cache.h> |
| 49 | −#include <linux/module.h> | |
| 50 | 49 | #include <linux/lockdep.h> |
| 51 | 50 | #include <linux/netdevice.h> |
| 52 | 51 | #include <linux/skbuff.h> /* struct sk_buff */ |
| @@ -729,6 +728,7 @@ struct request_sock_ops; · 676 unmodified lines | ||
| 729 | 728 | struct timewait_sock_ops; |
| 730 | 729 | struct inet_hashinfo; |
| 731 | 730 | struct raw_hashinfo; |
| 731 | +struct module; | |
| 732 | 732 | |
| 733 | 733 | /* Networking protocol blocks we attach to sockets. |
| 734 | 734 | * socket layer -> transport layer interface |
| @@ -22,7 +22,6 @@ · 21 unmodified lines | ||
| 22 | 22 | * |
| 23 | 23 | */ |
| 24 | 24 | |
| 25 | −#include <linux/module.h> | |
| 26 | 25 | #include <linux/sched.h> /* wake_up() */ |
| 27 | 26 | #include <linux/mutex.h> /* struct mutex */ |
| 28 | 27 | #include <linux/rwsem.h> /* struct rw_semaphore */ |
| @@ -43,6 +42,7 @@ · 14 unmodified lines | ||
| 43 | 42 | #ifdef CONFIG_PCI |
| 44 | 43 | struct pci_dev; |
| 45 | 44 | #endif |
| 45 | +struct module; | |
| 46 | 46 | |
| 47 | 47 | /* device allocation stuff */ |
| 48 | 48 | |
| @@ -21,16 +21,6 @@ · 20 unmodified lines | ||
| 21 | 21 | #undef CREATE_TRACE_POINTS |
| 22 | 22 | |
| 23 | 23 | #include <linux/stringify.h> |
| 24 | −/* | |
| 25 | − * module.h includes tracepoints, and because ftrace.h | |
| 26 | − * pulls in module.h: | |
| 27 | − * trace/ftrace.h -> linux/ftrace_event.h -> linux/perf_event.h -> | |
| 28 | − * linux/ftrace.h -> linux/module.h | |
| 29 | − * we must include module.h here before we play with any of | |
| 30 | − * the TRACE_EVENT() macros, otherwise the tracepoints included | |
| 31 | − * by module.h may break the build. | |
| 32 | − */ | |
| 33 | −#include <linux/module.h> | |
| 34 | 24 | |
| 35 | 25 | #undef TRACE_EVENT |
| 36 | 26 | #define TRACE_EVENT(name, proto, args, tstruct, assign, print) \ |
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | /* |
| 2 | 2 | * Because linux/module.h has tracepoints in the header, and ftrace.h |
| 3 | − * eventually includes this file, define_trace.h includes linux/module.h | |
| 3 | + * used to include this file, define_trace.h includes linux/module.h | |
| 4 | 4 | * But we do not want the module.h to override the TRACE_SYSTEM macro |
| 5 | 5 | * variable that define_trace.h is processing, so we only set it |
| 6 | 6 | * when module events are being processed, which would happen when |
| @@ -37,6 +37,7 @@ · 36 unmodified lines | ||
| 37 | 37 | #include <linux/device.h> |
| 38 | 38 | #include <linux/notifier.h> |
| 39 | 39 | #include <linux/mutex.h> |
| 40 | +#include <linux/export.h> | |
| 40 | 41 | #include <linux/completion.h> |
| 41 | 42 | #include <linux/init.h> |
| 42 | 43 | #include <linux/slab.h> |