History

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

Linus Torvalds committed 15 years ago

Commit 32aaeff2 parents 208bca0 67b84992057 files · +2248 −606Browse files

Showing the changes to include (55 of 2057 files). Show all

Unified · Split

55 files
  1. include/acpi/platform/aclinux.h +0 −1
  2. include/drm/drmP.h +2 −1
  3. include/linux/bcma/bcma.h +3 −4
  4. include/linux/blkdev.h +1 −1
  5. include/linux/cpuidle.h +2 −1
  6. include/linux/crypto.h +0 −6
  7. include/linux/device.h +10 −5
  8. include/linux/device_cgroup.h +0 −1
  9. include/linux/dmaengine.h +2 −0
  10. include/linux/export.h +89 −0
  11. include/linux/firmware.h +1 −1
  12. include/linux/ftrace.h +1 −1
  13. include/linux/gameport.h +8 −9
  14. include/linux/hid.h +5 −4
  15. include/linux/i2c.h +5 −5
  16. include/linux/ipmi.h +2 −1
  17. include/linux/ipmi_smi.h +0 −1
  18. include/linux/irq.h +12 −20
  19. include/linux/irqdesc.h +1 −0
  20. include/linux/mdio-bitbang.h +2 −1
  21. include/linux/miscdevice.h +2 −1
  22. include/linux/module.h +1 −72
  23. include/linux/moduleparam.h +5 −0
  24. include/linux/mtd/mtd.h +2 −1
  25. include/linux/of.h +1 −0
  26. include/linux/of_platform.h +0 −1
  27. include/linux/pci_hotplug.h +3 −7
  28. include/linux/pm_runtime.h +1 −0
  29. include/linux/regmap.h +1 −1
  30. include/linux/regulator/driver.h +1 −0
  31. include/linux/serio.h +11 −9
  32. include/linux/ssb/ssb.h +3 −4
  33. include/linux/stop_machine.h +1 −0
  34. include/linux/sunrpc/svc_xprt.h +2 −1
  35. include/linux/sysdev.h +0 −1
  36. include/linux/textsearch.h +2 −1
  37. include/linux/uio_driver.h +6 −6
  38. include/linux/usb.h +5 −4
  39. include/linux/uwb.h +1 −0
  40. include/linux/uwb/umc.h +3 −4
  41. include/linux/vermagic.h +0 −1
  42. include/linux/vlynq.h +2 −1
  43. include/media/saa7146.h +2 −1
  44. include/media/v4l2-int-device.h +2 −1
  45. include/net/bluetooth/hci_core.h +13 −11
  46. include/net/inet_timewait_sock.h +0 −1
  47. include/net/ip_vs.h +7 −8
  48. include/net/lib80211.h +2 −1
  49. include/net/netfilter/nf_conntrack.h +2 −0
  50. include/net/sch_generic.h +0 −1
  51. include/net/sock.h +1 −1
  52. include/sound/core.h +1 −1
  53. include/trace/define_trace.h +0 −10
  54. include/trace/events/module.h +1 −1
  55. include/xen/xenbus.h +1 −0
include/acpi/platform/aclinux.h+0−1
@@ -55,7 +55,6 @@ · 54 unmodified lines
55 55
56#include <linux/string.h>56#include <linux/string.h>
57#include <linux/kernel.h>57#include <linux/kernel.h>
58#include <linux/module.h>
59#include <linux/ctype.h>58#include <linux/ctype.h>
60#include <linux/sched.h>59#include <linux/sched.h>
61#include <asm/system.h>60#include <asm/system.h>
include/drm/drmP.h+2−1
@@ -42,7 +42,6 @@ · 41 unmodified lines
42 * can build the DRM (part of PI DRI). 4/21/2000 S + B */42 * can build the DRM (part of PI DRI). 4/21/2000 S + B */
43#include <asm/current.h>43#include <asm/current.h>
44#endif /* __alpha__ */44#endif /* __alpha__ */
45#include <linux/module.h>
46#include <linux/kernel.h>45#include <linux/kernel.h>
47#include <linux/miscdevice.h>46#include <linux/miscdevice.h>
48#include <linux/fs.h>47#include <linux/fs.h>
@@ -80,6 +79,8 @@ · 31 unmodified lines
80#define __OS_HAS_AGP (defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) && defined(MODULE)))79#define __OS_HAS_AGP (defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) && defined(MODULE)))
81#define __OS_HAS_MTRR (defined(CONFIG_MTRR))80#define __OS_HAS_MTRR (defined(CONFIG_MTRR))
82 81
82struct module;
83
83struct drm_file;84struct drm_file;
84struct drm_device;85struct drm_device;
85 86
include/linux/bcma/bcma.h+3−4
@@ -170,10 +170,9 @@ struct bcma_driver { · 169 unmodified lines
170};170};
171extern171extern
172int __bcma_driver_register(struct bcma_driver *drv, struct module *owner);172int __bcma_driver_register(struct bcma_driver *drv, struct module *owner);
173static 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}
177extern void bcma_driver_unregister(struct bcma_driver *drv);176extern void bcma_driver_unregister(struct bcma_driver *drv);
178 177
179struct bcma_bus {178struct bcma_bus {
include/linux/blkdev.h+1−1
@@ -14,7 +14,6 @@ · 13 unmodified lines
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 @@ · 1 unmodified line
22 21
23#include <asm/scatterlist.h>22#include <asm/scatterlist.h>
24 23
24struct module;
25struct scsi_ioctl_command;25struct scsi_ioctl_command;
26 26
27struct request_queue;27struct request_queue;
include/linux/cpuidle.h+2−1
@@ -13,7 +13,6 @@ · 12 unmodified lines
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 @@ · 1 unmodified line
21#define CPUIDLE_NAME_LEN 1620#define CPUIDLE_NAME_LEN 16
22#define CPUIDLE_DESC_LEN 3221#define CPUIDLE_DESC_LEN 32
23 22
23struct module;
24
24struct cpuidle_device;25struct cpuidle_device;
25 26
26 27
include/linux/crypto.h+0−6
@@ -18,7 +18,6 @@ · 17 unmodified lines
18#define _LINUX_CRYPTO_H18#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) · 485 unmodified lines
510 return tfm->__crt_alg->cra_priority;509 return tfm->__crt_alg->cra_priority;
511}510}
512 511
513static inline const char *crypto_tfm_alg_modname(struct crypto_tfm *tfm)
514{
515 return module_name(tfm->__crt_alg->cra_module);
516}
517
518static inline u32 crypto_tfm_alg_type(struct crypto_tfm *tfm)512static 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;
include/linux/device.h+10−5
@@ -20,7 +20,7 @@ · 19 unmodified lines
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; · 2 unmodified lines
29struct device_private;29struct device_private;
30struct device_driver;30struct device_driver;
31struct driver_private;31struct driver_private;
32struct module;
32struct class;33struct class;
33struct subsys_private;34struct subsys_private;
34struct bus_type;35struct bus_type;
@@ -723,10 +724,14 @@ extern int dev_set_drvdata(struct device *dev, void *data); · 688 unmodified lines
723 */724 */
724extern struct device *__root_device_register(const char *name,725extern struct device *__root_device_register(const char *name,
725 struct module *owner);726 struct module *owner);
726static 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
730extern void root_device_unregister(struct device *root);735extern void root_device_unregister(struct device *root);
731 736
732static inline void *dev_get_platdata(const struct device *dev)737static inline void *dev_get_platdata(const struct device *dev)
include/linux/device_cgroup.h+0−1
@@ -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_DEVICE3#ifdef CONFIG_CGROUP_DEVICE
include/linux/dmaengine.h+2−0
@@ -25,6 +25,8 @@ · 24 unmodified lines
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 cookie32 * typedef dma_cookie_t - an opaque DMA cookie
include/linux/export.h+89−0
@@ -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
19struct kernel_symbol
20{
21 unsigned long value;
22 const char *name;
23};
24
25#ifdef MODULE
26extern 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 */
include/linux/firmware.h+1−1
@@ -1,7 +1,6 @@
1#ifndef _LINUX_FIRMWARE_H1#ifndef _LINUX_FIRMWARE_H
2#define _LINUX_FIRMWARE_H2#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 { · 7 unmodified lines
15 struct page **pages;14 struct page **pages;
16};15};
17 16
17struct module;
18struct device;18struct device;
19 19
20struct builtin_fw {20struct builtin_fw {
include/linux/ftrace.h+1−1
@@ -10,7 +10,6 @@ · 9 unmodified lines
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 @@ · 2 unmodified lines
19 18
20#include <asm/ftrace.h>19#include <asm/ftrace.h>
21 20
21struct module;
22struct ftrace_hash;22struct ftrace_hash;
23 23
24#ifdef CONFIG_FUNCTION_TRACER24#ifdef CONFIG_FUNCTION_TRACER
include/linux/gameport.h+8−9
@@ -71,10 +71,9 @@ void gameport_close(struct gameport *gameport); · 70 unmodified lines
71#if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))71#if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
72 72
73void __gameport_register_port(struct gameport *gameport, struct module *owner);73void __gameport_register_port(struct gameport *gameport, struct module *owner);
74static 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
79void gameport_unregister_port(struct gameport *gameport);78void 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 mutex_unlock(&gameport->drv_mutex);144 mutex_unlock(&gameport->drv_mutex);
146}145}
147 146
148int __gameport_register_driver(struct gameport_driver *drv,147int __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);
150static 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
155void gameport_unregister_driver(struct gameport_driver *drv);154void gameport_unregister_driver(struct gameport_driver *drv);
156 155
include/linux/hid.h+5−4
@@ -697,10 +697,11 @@ extern void hid_destroy_device(struct hid_device *); · 696 unmodified lines
697 697
698extern int __must_check __hid_register_driver(struct hid_driver *,698extern int __must_check __hid_register_driver(struct hid_driver *,
699 struct module *, const char *mod_name);699 struct module *, const char *mod_name);
700static 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
704extern void hid_unregister_driver(struct hid_driver *);705extern void hid_unregister_driver(struct hid_driver *);
705 706
706extern void hidinput_hid_event(struct hid_device *, struct hid_field *, struct hid_usage *, __s32);707extern void hidinput_hid_event(struct hid_device *, struct hid_field *, struct hid_usage *, __s32);
include/linux/i2c.h+5−5
@@ -28,7 +28,6 @@ · 27 unmodified lines
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; · 14 unmodified lines
49union i2c_smbus_data;48union i2c_smbus_data;
50struct i2c_board_info;49struct i2c_board_info;
51 50
51struct 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 devices55 * 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
451extern int i2c_register_driver(struct module *, struct i2c_driver *);452extern int i2c_register_driver(struct module *, struct i2c_driver *);
452extern void i2c_del_driver(struct i2c_driver *);453extern void i2c_del_driver(struct i2c_driver *);
453 454
454static 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
459extern struct i2c_client *i2c_use_client(struct i2c_client *client);459extern struct i2c_client *i2c_use_client(struct i2c_client *client);
460extern void i2c_release_client(struct i2c_client *client);460extern void i2c_release_client(struct i2c_client *client);
include/linux/ipmi.h+2−1
@@ -220,10 +220,11 @@ struct kernel_ipmi_msg { · 219 unmodified lines
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
226struct module;
227
227/* Opaque type for a IPMI message user. One of these is needed to228/* Opaque type for a IPMI message user. One of these is needed to
228 send and receive messages. */229 send and receive messages. */
229typedef struct ipmi_user *ipmi_user_t;230typedef struct ipmi_user *ipmi_user_t;
include/linux/ipmi_smi.h+0−1
@@ -36,7 +36,6 @@ · 35 unmodified lines
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>
include/linux/irq.h+12−20
@@ -23,13 +23,13 @@ · 22 unmodified lines
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
32struct seq_file;31struct seq_file;
32struct module;
33struct irq_desc;33struct irq_desc;
34struct irq_data;34struct irq_data;
35typedef void (*irq_flow_handler_t)(unsigned int irq,35typedef 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
567int __irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node,567int __irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node,
568 struct module *owner);568 struct module *owner);
569 569
570static 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
576void irq_free_descs(unsigned int irq, unsigned int cnt);574#define irq_alloc_desc(node) \
577int irq_reserve_irqs(unsigned int from, unsigned int cnt);575 irq_alloc_descs(-1, 0, 1, node)
578 576
579static 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
584static 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
589static inline int irq_alloc_desc_from(unsigned int from, int node)583void irq_free_descs(unsigned int irq, unsigned int cnt);
590{584int irq_reserve_irqs(unsigned int from, unsigned int cnt);
591 return irq_alloc_descs(-1, from, 1, node);
592}
593 585
594static inline void irq_free_desc(unsigned int irq)586static inline void irq_free_desc(unsigned int irq)
595{587{
include/linux/irqdesc.h+1−0
@@ -11,6 +11,7 @@ · 10 unmodified lines
11struct irq_affinity_notify;11struct irq_affinity_notify;
12struct proc_dir_entry;12struct proc_dir_entry;
13struct timer_rand_state;13struct timer_rand_state;
14struct module;
14/**15/**
15 * struct irq_desc - interrupt descriptor16 * struct irq_desc - interrupt descriptor
16 * @irq_data: per irq and chip data passed down to chip functions17 * @irq_data: per irq and chip data passed down to chip functions
include/linux/mdio-bitbang.h+2−1
@@ -2,7 +2,8 @@ · 1 unmodified line
2#define __LINUX_MDIO_BITBANG_H2#define __LINUX_MDIO_BITBANG_H
3 3
4#include <linux/phy.h>4#include <linux/phy.h>
5#include <linux/module.h>5
6struct module;
6 7
7struct mdiobb_ctrl;8struct mdiobb_ctrl;
8 9
include/linux/miscdevice.h+2−1
@@ -1,7 +1,8 @@
1#ifndef _LINUX_MISCDEVICE_H1#ifndef _LINUX_MISCDEVICE_H
2#define _LINUX_MISCDEVICE_H2#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 an8 * These allocations are managed by device@lanana.org. If you use an
include/linux/module.h+1−72
@@ -16,6 +16,7 @@ · 15 unmodified lines
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 @@ · 3 unmodified lines
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_LEN29#define MODULE_NAME_LEN MAX_PARAM_PREFIX_LEN
36 30
37struct kernel_symbol
38{
39 unsigned long value;
40 const char *name;
41};
42
43struct modversion_info31struct modversion_info
44{32{
45 unsigned long crc;33 unsigned long crc;
@@ -98,11 +86,8 @@ void trim_init_extable(struct module *m); · 52 unmodified lines
98extern const struct gtype##_id __mod_##gtype##_table \86extern const struct gtype##_id __mod_##gtype##_table \
99 __attribute__ ((unused, alias(__stringify(name))))87 __attribute__ ((unused, alias(__stringify(name))))
100 88
101extern 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#endif91#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; · 41 unmodified lines
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 { · 57 unmodified lines
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
267enum module_state201enum module_state
268{202{
269 MODULE_STATE_LIVE,203 MODULE_STATE_LIVE,
@@ -581,11 +515,6 @@ int unregister_module_notifier(struct notifier_block * nb); · 311 unmodified lines
581extern void print_modules(void);515extern 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. */
591static inline const struct exception_table_entry *520static inline const struct exception_table_entry *
include/linux/moduleparam.h+5−0
@@ -31,6 +31,11 @@ static const char __module_cat(name,__LINE__)[] \ · 30 unmodified lines
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
34struct kernel_param;39struct kernel_param;
35 40
36struct kernel_param_ops {41struct kernel_param_ops {
include/linux/mtd/mtd.h+2−1
@@ -21,7 +21,6 @@ · 20 unmodified lines
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 { · 97 unmodified lines
125 struct nand_oobfree oobfree[MTD_MAX_OOBFREE_ENTRIES_LARGE];124 struct nand_oobfree oobfree[MTD_MAX_OOBFREE_ENTRIES_LARGE];
126};125};
127 126
127struct module; /* only needed for owner field in mtd_info */
128
128struct mtd_info {129struct mtd_info {
129 u_char type;130 u_char type;
130 uint32_t flags;131 uint32_t flags;
include/linux/of.h+1−0
@@ -23,6 +23,7 @@ · 22 unmodified lines
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
27typedef u32 phandle;28typedef u32 phandle;
28typedef u32 ihandle;29typedef u32 ihandle;
include/linux/of_platform.h+0−1
@@ -12,7 +12,6 @@ · 11 unmodified lines
12 */12 */
13 13
14#ifdef CONFIG_OF_DEVICE14#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>
include/linux/pci_hotplug.h+3−7
@@ -132,13 +132,9 @@ extern int pci_hp_deregister(struct hotplug_slot *slot); · 131 unmodified lines
132extern int __must_check pci_hp_change_slot_info (struct hotplug_slot *slot,132extern 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
135static 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) */
144struct hpp_type0 {140struct hpp_type0 {
include/linux/pm_runtime.h+1−0
@@ -10,6 +10,7 @@ · 9 unmodified lines
10#define _LINUX_PM_RUNTIME_H10#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>
include/linux/regmap.h+1−1
@@ -15,8 +15,8 @@ · 14 unmodified lines
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
19struct module;
20struct i2c_client;20struct i2c_client;
21struct spi_device;21struct spi_device;
22 22
include/linux/regulator/driver.h+1−0
@@ -16,6 +16,7 @@ · 15 unmodified lines
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
21struct regulator_dev;22struct regulator_dev;
include/linux/serio.h+11−9
@@ -79,19 +79,21 @@ void serio_reconnect(struct serio *serio); · 78 unmodified lines
79irqreturn_t serio_interrupt(struct serio *serio, unsigned char data, unsigned int flags);79irqreturn_t serio_interrupt(struct serio *serio, unsigned char data, unsigned int flags);
80 80
81void __serio_register_port(struct serio *serio, struct module *owner);81void __serio_register_port(struct serio *serio, struct module *owner);
82static 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
87void serio_unregister_port(struct serio *serio);87void serio_unregister_port(struct serio *serio);
88void serio_unregister_child_port(struct serio *serio);88void serio_unregister_child_port(struct serio *serio);
89 89
90int __serio_register_driver(struct serio_driver *drv, struct module *owner, const char *mod_name);90int __must_check __serio_register_driver(struct serio_driver *drv,
91static 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
95void serio_unregister_driver(struct serio_driver *drv);97void serio_unregister_driver(struct serio_driver *drv);
96 98
97static inline int serio_write(struct serio *serio, unsigned char data)99static inline int serio_write(struct serio *serio, unsigned char data)
include/linux/ssb/ssb.h+3−4
@@ -231,10 +231,9 @@ struct ssb_driver { · 230 unmodified lines
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
233extern int __ssb_driver_register(struct ssb_driver *drv, struct module *owner);233extern int __ssb_driver_register(struct ssb_driver *drv, struct module *owner);
234static 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}
238extern void ssb_driver_unregister(struct ssb_driver *drv);237extern void ssb_driver_unregister(struct ssb_driver *drv);
239 238
240 239
include/linux/stop_machine.h+1−0
@@ -3,6 +3,7 @@ · 2 unmodified lines
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
include/linux/sunrpc/svc_xprt.h+2−1
@@ -8,7 +8,8 @@ · 7 unmodified lines
8#define SUNRPC_SVC_XPRT_H8#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
12struct module;
12 13
13struct svc_xprt_ops {14struct svc_xprt_ops {
14 struct svc_xprt *(*xpo_create)(struct svc_serv *,15 struct svc_xprt *(*xpo_create)(struct svc_serv *,
include/linux/sysdev.h+0−1
@@ -22,7 +22,6 @@ · 21 unmodified lines
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
include/linux/textsearch.h+2−1
@@ -4,10 +4,11 @@ · 3 unmodified lines
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
10struct module;
11
11struct ts_config;12struct 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 */
include/linux/uio_driver.h+6−6
@@ -14,10 +14,10 @@ · 13 unmodified lines
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
20struct module;
21struct uio_map;21struct uio_map;
22 22
23/**23/**
@@ -101,11 +101,11 @@ extern int __must_check · 77 unmodified lines
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);
104static inline int __must_check104
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
109extern void uio_unregister_device(struct uio_info *info);109extern void uio_unregister_device(struct uio_info *info);
110extern void uio_event_notify(struct uio_info *info);110extern void uio_event_notify(struct uio_info *info);
111 111
include/linux/usb.h+5−4
@@ -946,10 +946,11 @@ struct usb_class_driver { · 945 unmodified lines
946 */946 */
947extern int usb_register_driver(struct usb_driver *, struct module *,947extern int usb_register_driver(struct usb_driver *, struct module *,
948 const char *);948 const char *);
949static 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
953extern void usb_deregister(struct usb_driver *);954extern void usb_deregister(struct usb_driver *);
954 955
955extern int usb_register_device_driver(struct usb_device_driver *,956extern int usb_register_device_driver(struct usb_device_driver *,
include/linux/uwb.h+1−0
@@ -33,6 +33,7 @@ · 32 unmodified lines
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
37struct uwb_dev;38struct uwb_dev;
38struct uwb_beca_e;39struct uwb_beca_e;
include/linux/uwb/umc.h+3−4
@@ -111,10 +111,9 @@ int __must_check __umc_driver_register(struct umc_driver *umc_drv, · 110 unmodified lines
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 */
114static 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}
118void umc_driver_unregister(struct umc_driver *umc_drv);117void umc_driver_unregister(struct umc_driver *umc_drv);
119 118
120/*119/*
include/linux/vermagic.h+0−1
@@ -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_SMP4#ifdef CONFIG_SMP
include/linux/vlynq.h+2−1
@@ -20,9 +20,10 @@ · 19 unmodified lines
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
25struct module;
26
26#define VLYNQ_NUM_IRQS 3227#define VLYNQ_NUM_IRQS 32
27 28
28struct vlynq_mapping {29struct vlynq_mapping {
include/media/saa7146.h+2−1
@@ -1,7 +1,6 @@
1#ifndef __SAA7146__1#ifndef __SAA7146__
2#define __SAA7146__2#define __SAA7146__
3 3
4#include <linux/module.h> /* for module-version */
5#include <linux/delay.h> /* for delay-stuff */4#include <linux/delay.h> /* for delay-stuff */
6#include <linux/slab.h> /* for kmalloc/kfree */5#include <linux/slab.h> /* for kmalloc/kfree */
7#include <linux/pci.h> /* for pci-config-stuff, vendor ids etc. */6#include <linux/pci.h> /* for pci-config-stuff, vendor ids etc. */
@@ -55,6 +54,8 @@ do { \ · 47 unmodified lines
55#define SAA7146_ISR_CLEAR(x,y) \54#define SAA7146_ISR_CLEAR(x,y) \
56 saa7146_write(x, ISR, (y));55 saa7146_write(x, ISR, (y));
57 56
57struct module;
58
58struct saa7146_dev;59struct saa7146_dev;
59struct saa7146_extension;60struct saa7146_extension;
60struct saa7146_vv;61struct saa7146_vv;
include/media/v4l2-int-device.h+2−1
@@ -25,7 +25,6 @@ · 24 unmodified lines
25#ifndef V4L2_INT_DEVICE_H25#ifndef V4L2_INT_DEVICE_H
26#define V4L2_INT_DEVICE_H26#define V4L2_INT_DEVICE_H
27 27
28#include <linux/module.h>
29#include <media/v4l2-common.h>28#include <media/v4l2-common.h>
30 29
31#define V4L2NAMESIZE 3230#define V4L2NAMESIZE 32
@@ -41,6 +40,8 @@ enum v4l2_int_type { · 9 unmodified lines
41 v4l2_int_type_slave40 v4l2_int_type_slave
42};41};
43 42
43struct module;
44
44struct v4l2_int_device;45struct v4l2_int_device;
45 46
46struct v4l2_int_master {47struct v4l2_int_master {
include/net/bluetooth/hci_core.h+13−11
@@ -513,11 +513,15 @@ static inline void __hci_dev_put(struct hci_dev *d) · 512 unmodified lines
513 d->destruct(d);513 d->destruct(d);
514}514}
515 515
516static inline void hci_dev_put(struct hci_dev *d)516/*
517{517 * hci_dev_put and hci_dev_hold are macros to avoid dragging all the
518 __hci_dev_put(d);518 * overhead of all the modular infrastructure into this header.
519 module_put(d->owner);519 */
520}520#define hci_dev_put(d) \
521do { \
522 __hci_dev_put(d); \
523 module_put(d->owner); \
524} while (0)
521 525
522static inline struct hci_dev *__hci_dev_hold(struct hci_dev *d)526static 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 return d;529 return d;
526}530}
527 531
528static inline struct hci_dev *hci_dev_hold(struct hci_dev *d)532#define hci_dev_hold(d) \
529{533({ \
530 if (try_module_get(d->owner))534 try_module_get(d->owner) ? __hci_dev_hold(d) : NULL; \
531 return __hci_dev_hold(d);535})
532 return NULL;
533}
534 536
535#define hci_dev_lock(d) spin_lock(&d->lock)537#define hci_dev_lock(d) spin_lock(&d->lock)
536#define hci_dev_unlock(d) spin_unlock(&d->lock)538#define hci_dev_unlock(d) spin_unlock(&d->lock)
include/net/inet_timewait_sock.h+0−1
@@ -18,7 +18,6 @@ · 17 unmodified lines
18 18
19#include <linux/kmemcheck.h>19#include <linux/kmemcheck.h>
20#include <linux/list.h>20#include <linux/list.h>
21#include <linux/module.h>
22#include <linux/timer.h>21#include <linux/timer.h>
23#include <linux/types.h>22#include <linux/types.h>
24#include <linux/workqueue.h>23#include <linux/workqueue.h>
include/net/ip_vs.h+7−8
@@ -1126,17 +1126,16 @@ int unregister_ip_vs_pe(struct ip_vs_pe *pe); · 1125 unmodified lines
1126struct ip_vs_pe *ip_vs_pe_getbyname(const char *name);1126struct ip_vs_pe *ip_vs_pe_getbyname(const char *name);
1127struct ip_vs_pe *__ip_vs_pe_getbyname(const char *pe_name);1127struct ip_vs_pe *__ip_vs_pe_getbyname(const char *pe_name);
1128 1128
1129static inline void ip_vs_pe_get(const struct ip_vs_pe *pe)1129/*
1130{1130 * Use a #define to avoid all of module.h just for these trivial ops
1131 if (pe && pe->module)1131 */
1132#define ip_vs_pe_get(pe) \
1133 if (pe && pe->module) \
1132 __module_get(pe->module);1134 __module_get(pe->module);
1133}
1134 1135
1135static inline void ip_vs_pe_put(const struct ip_vs_pe *pe)1136#define ip_vs_pe_put(pe) \
1136{1137 if (pe && pe->module) \
1137 if (pe && pe->module)
1138 module_put(pe->module);1138 module_put(pe->module);
1139}
1140 1139
1141/*1140/*
1142 * IPVS protocol functions (from ip_vs_proto.c)1141 * IPVS protocol functions (from ip_vs_proto.c)
include/net/lib80211.h+2−1
@@ -25,7 +25,6 @@ · 24 unmodified lines
25 25
26#include <linux/types.h>26#include <linux/types.h>
27#include <linux/list.h>27#include <linux/list.h>
28#include <linux/module.h>
29#include <linux/atomic.h>28#include <linux/atomic.h>
30#include <linux/if.h>29#include <linux/if.h>
31#include <linux/skbuff.h>30#include <linux/skbuff.h>
@@ -42,6 +41,8 @@ enum { · 10 unmodified lines
42 IEEE80211_CRYPTO_TKIP_COUNTERMEASURES = (1 << 0),41 IEEE80211_CRYPTO_TKIP_COUNTERMEASURES = (1 << 0),
43};42};
44 43
44struct module;
45
45struct lib80211_crypto_ops {46struct lib80211_crypto_ops {
46 const char *name;47 const char *name;
47 struct list_head list;48 struct list_head list;
include/net/netfilter/nf_conntrack.h+2−0
@@ -313,6 +313,8 @@ static inline bool nf_is_loopback_packet(const struct sk_buff *skb) · 312 unmodified lines
313 return skb->dev && skb->skb_iif && skb->dev->flags & IFF_LOOPBACK;313 return skb->dev && skb->skb_iif && skb->dev->flags & IFF_LOOPBACK;
314}314}
315 315
316struct kernel_param;
317
316extern int nf_conntrack_set_hashsize(const char *val, struct kernel_param *kp);318extern int nf_conntrack_set_hashsize(const char *val, struct kernel_param *kp);
317extern unsigned int nf_conntrack_htable_size;319extern unsigned int nf_conntrack_htable_size;
318extern unsigned int nf_conntrack_max;320extern unsigned int nf_conntrack_max;
include/net/sch_generic.h+0−1
@@ -4,7 +4,6 @@ · 3 unmodified lines
4#include <linux/netdevice.h>4#include <linux/netdevice.h>
5#include <linux/types.h>5#include <linux/types.h>
6#include <linux/rcupdate.h>6#include <linux/rcupdate.h>
7#include <linux/module.h>
8#include <linux/pkt_sched.h>7#include <linux/pkt_sched.h>
9#include <linux/pkt_cls.h>8#include <linux/pkt_cls.h>
10#include <net/gen_stats.h>9#include <net/gen_stats.h>
include/net/sock.h+1−1
@@ -46,7 +46,6 @@ · 45 unmodified lines
46#include <linux/list_nulls.h>46#include <linux/list_nulls.h>
47#include <linux/timer.h>47#include <linux/timer.h>
48#include <linux/cache.h>48#include <linux/cache.h>
49#include <linux/module.h>
50#include <linux/lockdep.h>49#include <linux/lockdep.h>
51#include <linux/netdevice.h>50#include <linux/netdevice.h>
52#include <linux/skbuff.h> /* struct sk_buff */51#include <linux/skbuff.h> /* struct sk_buff */
@@ -729,6 +728,7 @@ struct request_sock_ops; · 676 unmodified lines
729struct timewait_sock_ops;728struct timewait_sock_ops;
730struct inet_hashinfo;729struct inet_hashinfo;
731struct raw_hashinfo;730struct raw_hashinfo;
731struct module;
732 732
733/* Networking protocol blocks we attach to sockets.733/* Networking protocol blocks we attach to sockets.
734 * socket layer -> transport layer interface734 * socket layer -> transport layer interface
include/sound/core.h+1−1
@@ -22,7 +22,6 @@ · 21 unmodified lines
22 *22 *
23 */23 */
24 24
25#include <linux/module.h>
26#include <linux/sched.h> /* wake_up() */25#include <linux/sched.h> /* wake_up() */
27#include <linux/mutex.h> /* struct mutex */26#include <linux/mutex.h> /* struct mutex */
28#include <linux/rwsem.h> /* struct rw_semaphore */27#include <linux/rwsem.h> /* struct rw_semaphore */
@@ -43,6 +42,7 @@ · 14 unmodified lines
43#ifdef CONFIG_PCI42#ifdef CONFIG_PCI
44struct pci_dev;43struct pci_dev;
45#endif44#endif
45struct module;
46 46
47/* device allocation stuff */47/* device allocation stuff */
48 48
include/trace/define_trace.h+0−10
@@ -21,16 +21,6 @@ · 20 unmodified lines
21#undef CREATE_TRACE_POINTS21#undef CREATE_TRACE_POINTS
22 22
23#include <linux/stringify.h>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#undef TRACE_EVENT25#undef TRACE_EVENT
36#define TRACE_EVENT(name, proto, args, tstruct, assign, print) \26#define TRACE_EVENT(name, proto, args, tstruct, assign, print) \
include/trace/events/module.h+1−1
@@ -1,6 +1,6 @@
1/*1/*
2 * Because linux/module.h has tracepoints in the header, and ftrace.h2 * Because linux/module.h has tracepoints in the header, and ftrace.h
3 * eventually includes this file, define_trace.h includes linux/module.h3 * used to include this file, define_trace.h includes linux/module.h
4 * But we do not want the module.h to override the TRACE_SYSTEM macro4 * But we do not want the module.h to override the TRACE_SYSTEM macro
5 * variable that define_trace.h is processing, so we only set it5 * variable that define_trace.h is processing, so we only set it
6 * when module events are being processed, which would happen when6 * when module events are being processed, which would happen when
include/xen/xenbus.h+1−0
@@ -37,6 +37,7 @@ · 36 unmodified lines
37#include <linux/device.h>37#include <linux/device.h>
38#include <linux/notifier.h>38#include <linux/notifier.h>
39#include <linux/mutex.h>39#include <linux/mutex.h>
40#include <linux/export.h>
40#include <linux/completion.h>41#include <linux/completion.h>
41#include <linux/init.h>42#include <linux/init.h>
42#include <linux/slab.h>43#include <linux/slab.h>