* '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/net (7 of 2057 files). Show all
Unified · Split
| @@ -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 |