diff options
-rw-r--r-- | drivers/media/video/cpia.c | 4 | ||||
-rw-r--r-- | drivers/media/video/usbvision/usbvision-core.c | 4 | ||||
-rw-r--r-- | drivers/media/video/usbvision/usbvision-video.c | 4 | ||||
-rw-r--r-- | drivers/media/video/v4l1-compat.c | 4 | ||||
-rw-r--r-- | drivers/media/video/v4l2-common.c | 4 | ||||
-rw-r--r-- | drivers/media/video/vino.c | 5 | ||||
-rw-r--r-- | drivers/media/video/w9968cf.c | 4 | ||||
-rw-r--r-- | drivers/mtd/mtdpart.c | 2 | ||||
-rw-r--r-- | drivers/net/irda/sir_dongle.c | 2 | ||||
-rw-r--r-- | drivers/net/ppp_generic.c | 10 | ||||
-rw-r--r-- | drivers/net/pppox.c | 9 | ||||
-rw-r--r-- | drivers/video/fbmem.c | 17 | ||||
-rw-r--r-- | fs/char_dev.c | 3 | ||||
-rw-r--r-- | fs/exec.c | 9 | ||||
-rw-r--r-- | fs/nls/nls_base.c | 21 | ||||
-rw-r--r-- | kernel/kmod.c | 2 |
16 files changed, 15 insertions, 89 deletions
diff --git a/drivers/media/video/cpia.c b/drivers/media/video/cpia.c index c325e926de8a..1798b779a25a 100644 --- a/drivers/media/video/cpia.c +++ b/drivers/media/video/cpia.c | |||
@@ -39,10 +39,6 @@ | |||
39 | #include <asm/io.h> | 39 | #include <asm/io.h> |
40 | #include <linux/mutex.h> | 40 | #include <linux/mutex.h> |
41 | 41 | ||
42 | #ifdef CONFIG_KMOD | ||
43 | #include <linux/kmod.h> | ||
44 | #endif | ||
45 | |||
46 | #include "cpia.h" | 42 | #include "cpia.h" |
47 | 43 | ||
48 | static int video_nr = -1; | 44 | static int video_nr = -1; |
diff --git a/drivers/media/video/usbvision/usbvision-core.c b/drivers/media/video/usbvision/usbvision-core.c index b26b563a0b0a..9e4f50639975 100644 --- a/drivers/media/video/usbvision/usbvision-core.c +++ b/drivers/media/video/usbvision/usbvision-core.c | |||
@@ -45,10 +45,6 @@ | |||
45 | 45 | ||
46 | #include <linux/workqueue.h> | 46 | #include <linux/workqueue.h> |
47 | 47 | ||
48 | #ifdef CONFIG_KMOD | ||
49 | #include <linux/kmod.h> | ||
50 | #endif | ||
51 | |||
52 | #include "usbvision.h" | 48 | #include "usbvision.h" |
53 | 49 | ||
54 | static unsigned int core_debug; | 50 | static unsigned int core_debug; |
diff --git a/drivers/media/video/usbvision/usbvision-video.c b/drivers/media/video/usbvision/usbvision-video.c index e10b256aeba4..77aeb39b2750 100644 --- a/drivers/media/video/usbvision/usbvision-video.c +++ b/drivers/media/video/usbvision/usbvision-video.c | |||
@@ -69,10 +69,6 @@ | |||
69 | 69 | ||
70 | #include <linux/workqueue.h> | 70 | #include <linux/workqueue.h> |
71 | 71 | ||
72 | #ifdef CONFIG_KMOD | ||
73 | #include <linux/kmod.h> | ||
74 | #endif | ||
75 | |||
76 | #include "usbvision.h" | 72 | #include "usbvision.h" |
77 | #include "usbvision-cards.h" | 73 | #include "usbvision-cards.h" |
78 | 74 | ||
diff --git a/drivers/media/video/v4l1-compat.c b/drivers/media/video/v4l1-compat.c index 79937d1031fc..928cb4037372 100644 --- a/drivers/media/video/v4l1-compat.c +++ b/drivers/media/video/v4l1-compat.c | |||
@@ -36,10 +36,6 @@ | |||
36 | #include <asm/system.h> | 36 | #include <asm/system.h> |
37 | #include <asm/pgtable.h> | 37 | #include <asm/pgtable.h> |
38 | 38 | ||
39 | #ifdef CONFIG_KMOD | ||
40 | #include <linux/kmod.h> | ||
41 | #endif | ||
42 | |||
43 | static unsigned int debug; | 39 | static unsigned int debug; |
44 | module_param(debug, int, 0644); | 40 | module_param(debug, int, 0644); |
45 | MODULE_PARM_DESC(debug, "enable debug messages"); | 41 | MODULE_PARM_DESC(debug, "enable debug messages"); |
diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c index 20c3be8617ea..846763d7349e 100644 --- a/drivers/media/video/v4l2-common.c +++ b/drivers/media/video/v4l2-common.c | |||
@@ -60,10 +60,6 @@ | |||
60 | #include <media/v4l2-common.h> | 60 | #include <media/v4l2-common.h> |
61 | #include <media/v4l2-chip-ident.h> | 61 | #include <media/v4l2-chip-ident.h> |
62 | 62 | ||
63 | #ifdef CONFIG_KMOD | ||
64 | #include <linux/kmod.h> | ||
65 | #endif | ||
66 | |||
67 | #include <linux/videodev2.h> | 63 | #include <linux/videodev2.h> |
68 | 64 | ||
69 | MODULE_AUTHOR("Bill Dirks, Justin Schoeman, Gerd Knorr"); | 65 | MODULE_AUTHOR("Bill Dirks, Justin Schoeman, Gerd Knorr"); |
diff --git a/drivers/media/video/vino.c b/drivers/media/video/vino.c index 8ec57df1904f..1efc5f3462c6 100644 --- a/drivers/media/video/vino.c +++ b/drivers/media/video/vino.c | |||
@@ -30,10 +30,7 @@ | |||
30 | #include <linux/mm.h> | 30 | #include <linux/mm.h> |
31 | #include <linux/time.h> | 31 | #include <linux/time.h> |
32 | #include <linux/version.h> | 32 | #include <linux/version.h> |
33 | |||
34 | #ifdef CONFIG_KMOD | ||
35 | #include <linux/kmod.h> | 33 | #include <linux/kmod.h> |
36 | #endif | ||
37 | 34 | ||
38 | #include <linux/i2c.h> | 35 | #include <linux/i2c.h> |
39 | #include <linux/i2c-algo-sgi.h> | 36 | #include <linux/i2c-algo-sgi.h> |
@@ -4634,7 +4631,7 @@ static int __init vino_module_init(void) | |||
4634 | } | 4631 | } |
4635 | vino_init_stage++; | 4632 | vino_init_stage++; |
4636 | 4633 | ||
4637 | #if defined(CONFIG_KMOD) && defined(MODULE) | 4634 | #ifdef MODULE |
4638 | request_module("saa7191"); | 4635 | request_module("saa7191"); |
4639 | request_module("indycam"); | 4636 | request_module("indycam"); |
4640 | #endif | 4637 | #endif |
diff --git a/drivers/media/video/w9968cf.c b/drivers/media/video/w9968cf.c index 11edf79f57be..dcd45dbd82dc 100644 --- a/drivers/media/video/w9968cf.c +++ b/drivers/media/video/w9968cf.c | |||
@@ -111,7 +111,7 @@ static int specific_debug = W9968CF_SPECIFIC_DEBUG; | |||
111 | 111 | ||
112 | static unsigned int param_nv[24]; /* number of values per parameter */ | 112 | static unsigned int param_nv[24]; /* number of values per parameter */ |
113 | 113 | ||
114 | #ifdef CONFIG_KMOD | 114 | #ifdef CONFIG_MODULES |
115 | module_param(ovmod_load, bool, 0644); | 115 | module_param(ovmod_load, bool, 0644); |
116 | #endif | 116 | #endif |
117 | module_param(simcams, ushort, 0644); | 117 | module_param(simcams, ushort, 0644); |
@@ -144,7 +144,7 @@ module_param(debug, ushort, 0644); | |||
144 | module_param(specific_debug, bool, 0644); | 144 | module_param(specific_debug, bool, 0644); |
145 | #endif | 145 | #endif |
146 | 146 | ||
147 | #ifdef CONFIG_KMOD | 147 | #ifdef CONFIG_MODULES |
148 | MODULE_PARM_DESC(ovmod_load, | 148 | MODULE_PARM_DESC(ovmod_load, |
149 | "\n<0|1> Automatic 'ovcamchip' module loading." | 149 | "\n<0|1> Automatic 'ovcamchip' module loading." |
150 | "\n0 disabled, 1 enabled." | 150 | "\n0 disabled, 1 enabled." |
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c index edb90b58a9b1..9a06dc93ee0d 100644 --- a/drivers/mtd/mtdpart.c +++ b/drivers/mtd/mtdpart.c | |||
@@ -564,10 +564,8 @@ int parse_mtd_partitions(struct mtd_info *master, const char **types, | |||
564 | 564 | ||
565 | for ( ; ret <= 0 && *types; types++) { | 565 | for ( ; ret <= 0 && *types; types++) { |
566 | parser = get_partition_parser(*types); | 566 | parser = get_partition_parser(*types); |
567 | #ifdef CONFIG_KMOD | ||
568 | if (!parser && !request_module("%s", *types)) | 567 | if (!parser && !request_module("%s", *types)) |
569 | parser = get_partition_parser(*types); | 568 | parser = get_partition_parser(*types); |
570 | #endif | ||
571 | if (!parser) { | 569 | if (!parser) { |
572 | printk(KERN_NOTICE "%s partition parsing not available\n", | 570 | printk(KERN_NOTICE "%s partition parsing not available\n", |
573 | *types); | 571 | *types); |
diff --git a/drivers/net/irda/sir_dongle.c b/drivers/net/irda/sir_dongle.c index 36030241f7a9..2a9930e6e2af 100644 --- a/drivers/net/irda/sir_dongle.c +++ b/drivers/net/irda/sir_dongle.c | |||
@@ -67,9 +67,7 @@ int sirdev_get_dongle(struct sir_dev *dev, IRDA_DONGLE type) | |||
67 | const struct dongle_driver *drv = NULL; | 67 | const struct dongle_driver *drv = NULL; |
68 | int err = -EINVAL; | 68 | int err = -EINVAL; |
69 | 69 | ||
70 | #ifdef CONFIG_KMOD | ||
71 | request_module("irda-dongle-%d", type); | 70 | request_module("irda-dongle-%d", type); |
72 | #endif | ||
73 | 71 | ||
74 | if (dev->dongle_drv != NULL) | 72 | if (dev->dongle_drv != NULL) |
75 | return -EBUSY; | 73 | return -EBUSY; |
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c index 0ca0fcbb7c01..94818ee3cef5 100644 --- a/drivers/net/ppp_generic.c +++ b/drivers/net/ppp_generic.c | |||
@@ -2127,13 +2127,9 @@ ppp_set_compress(struct ppp *ppp, unsigned long arg) | |||
2127 | || ccp_option[1] < 2 || ccp_option[1] > data.length) | 2127 | || ccp_option[1] < 2 || ccp_option[1] > data.length) |
2128 | goto out; | 2128 | goto out; |
2129 | 2129 | ||
2130 | cp = find_compressor(ccp_option[0]); | 2130 | cp = try_then_request_module( |
2131 | #ifdef CONFIG_KMOD | 2131 | find_compressor(ccp_option[0]), |
2132 | if (!cp) { | 2132 | "ppp-compress-%d", ccp_option[0]); |
2133 | request_module("ppp-compress-%d", ccp_option[0]); | ||
2134 | cp = find_compressor(ccp_option[0]); | ||
2135 | } | ||
2136 | #endif /* CONFIG_KMOD */ | ||
2137 | if (!cp) | 2133 | if (!cp) |
2138 | goto out; | 2134 | goto out; |
2139 | 2135 | ||
diff --git a/drivers/net/pppox.c b/drivers/net/pppox.c index c6898c1fc54d..03aecc97fb45 100644 --- a/drivers/net/pppox.c +++ b/drivers/net/pppox.c | |||
@@ -115,13 +115,8 @@ static int pppox_create(struct net *net, struct socket *sock, int protocol) | |||
115 | goto out; | 115 | goto out; |
116 | 116 | ||
117 | rc = -EPROTONOSUPPORT; | 117 | rc = -EPROTONOSUPPORT; |
118 | #ifdef CONFIG_KMOD | 118 | if (!pppox_protos[protocol]) |
119 | if (!pppox_protos[protocol]) { | 119 | request_module("pppox-proto-%d", protocol); |
120 | char buffer[32]; | ||
121 | sprintf(buffer, "pppox-proto-%d", protocol); | ||
122 | request_module(buffer); | ||
123 | } | ||
124 | #endif | ||
125 | if (!pppox_protos[protocol] || | 120 | if (!pppox_protos[protocol] || |
126 | !try_module_get(pppox_protos[protocol]->owner)) | 121 | !try_module_get(pppox_protos[protocol]->owner)) |
127 | goto out; | 122 | goto out; |
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 0737570030f5..3f18bb9abad0 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c | |||
@@ -28,9 +28,7 @@ | |||
28 | #include <linux/proc_fs.h> | 28 | #include <linux/proc_fs.h> |
29 | #include <linux/seq_file.h> | 29 | #include <linux/seq_file.h> |
30 | #include <linux/console.h> | 30 | #include <linux/console.h> |
31 | #ifdef CONFIG_KMOD | ||
32 | #include <linux/kmod.h> | 31 | #include <linux/kmod.h> |
33 | #endif | ||
34 | #include <linux/err.h> | 32 | #include <linux/err.h> |
35 | #include <linux/device.h> | 33 | #include <linux/device.h> |
36 | #include <linux/efi.h> | 34 | #include <linux/efi.h> |
@@ -837,13 +835,6 @@ fb_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) | |||
837 | return (cnt) ? cnt : err; | 835 | return (cnt) ? cnt : err; |
838 | } | 836 | } |
839 | 837 | ||
840 | #ifdef CONFIG_KMOD | ||
841 | static void try_to_load(int fb) | ||
842 | { | ||
843 | request_module("fb%d", fb); | ||
844 | } | ||
845 | #endif /* CONFIG_KMOD */ | ||
846 | |||
847 | int | 838 | int |
848 | fb_pan_display(struct fb_info *info, struct fb_var_screeninfo *var) | 839 | fb_pan_display(struct fb_info *info, struct fb_var_screeninfo *var) |
849 | { | 840 | { |
@@ -1086,10 +1077,8 @@ fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | |||
1086 | return -EINVAL; | 1077 | return -EINVAL; |
1087 | if (con2fb.framebuffer < 0 || con2fb.framebuffer >= FB_MAX) | 1078 | if (con2fb.framebuffer < 0 || con2fb.framebuffer >= FB_MAX) |
1088 | return -EINVAL; | 1079 | return -EINVAL; |
1089 | #ifdef CONFIG_KMOD | ||
1090 | if (!registered_fb[con2fb.framebuffer]) | 1080 | if (!registered_fb[con2fb.framebuffer]) |
1091 | try_to_load(con2fb.framebuffer); | 1081 | request_module("fb%d", con2fb.framebuffer); |
1092 | #endif /* CONFIG_KMOD */ | ||
1093 | if (!registered_fb[con2fb.framebuffer]) | 1082 | if (!registered_fb[con2fb.framebuffer]) |
1094 | return -EINVAL; | 1083 | return -EINVAL; |
1095 | event.info = info; | 1084 | event.info = info; |
@@ -1327,10 +1316,8 @@ fb_open(struct inode *inode, struct file *file) | |||
1327 | if (fbidx >= FB_MAX) | 1316 | if (fbidx >= FB_MAX) |
1328 | return -ENODEV; | 1317 | return -ENODEV; |
1329 | lock_kernel(); | 1318 | lock_kernel(); |
1330 | #ifdef CONFIG_KMOD | ||
1331 | if (!(info = registered_fb[fbidx])) | 1319 | if (!(info = registered_fb[fbidx])) |
1332 | try_to_load(fbidx); | 1320 | request_module("fb%d", fbidx); |
1333 | #endif /* CONFIG_KMOD */ | ||
1334 | if (!(info = registered_fb[fbidx])) { | 1321 | if (!(info = registered_fb[fbidx])) { |
1335 | res = -ENODEV; | 1322 | res = -ENODEV; |
1336 | goto out; | 1323 | goto out; |
diff --git a/fs/char_dev.c b/fs/char_dev.c index 3cb7cda3d780..262fa10e213d 100644 --- a/fs/char_dev.c +++ b/fs/char_dev.c | |||
@@ -22,9 +22,6 @@ | |||
22 | #include <linux/mutex.h> | 22 | #include <linux/mutex.h> |
23 | #include <linux/backing-dev.h> | 23 | #include <linux/backing-dev.h> |
24 | 24 | ||
25 | #ifdef CONFIG_KMOD | ||
26 | #include <linux/kmod.h> | ||
27 | #endif | ||
28 | #include "internal.h" | 25 | #include "internal.h" |
29 | 26 | ||
30 | /* | 27 | /* |
@@ -50,15 +50,12 @@ | |||
50 | #include <linux/cn_proc.h> | 50 | #include <linux/cn_proc.h> |
51 | #include <linux/audit.h> | 51 | #include <linux/audit.h> |
52 | #include <linux/tracehook.h> | 52 | #include <linux/tracehook.h> |
53 | #include <linux/kmod.h> | ||
53 | 54 | ||
54 | #include <asm/uaccess.h> | 55 | #include <asm/uaccess.h> |
55 | #include <asm/mmu_context.h> | 56 | #include <asm/mmu_context.h> |
56 | #include <asm/tlb.h> | 57 | #include <asm/tlb.h> |
57 | 58 | ||
58 | #ifdef CONFIG_KMOD | ||
59 | #include <linux/kmod.h> | ||
60 | #endif | ||
61 | |||
62 | #ifdef __alpha__ | 59 | #ifdef __alpha__ |
63 | /* for /sbin/loader handling in search_binary_handler() */ | 60 | /* for /sbin/loader handling in search_binary_handler() */ |
64 | #include <linux/a.out.h> | 61 | #include <linux/a.out.h> |
@@ -1245,8 +1242,8 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs) | |||
1245 | read_unlock(&binfmt_lock); | 1242 | read_unlock(&binfmt_lock); |
1246 | if (retval != -ENOEXEC || bprm->mm == NULL) { | 1243 | if (retval != -ENOEXEC || bprm->mm == NULL) { |
1247 | break; | 1244 | break; |
1248 | #ifdef CONFIG_KMOD | 1245 | #ifdef CONFIG_MODULES |
1249 | }else{ | 1246 | } else { |
1250 | #define printable(c) (((c)=='\t') || ((c)=='\n') || (0x20<=(c) && (c)<=0x7e)) | 1247 | #define printable(c) (((c)=='\t') || ((c)=='\n') || (0x20<=(c) && (c)<=0x7e)) |
1251 | if (printable(bprm->buf[0]) && | 1248 | if (printable(bprm->buf[0]) && |
1252 | printable(bprm->buf[1]) && | 1249 | printable(bprm->buf[1]) && |
diff --git a/fs/nls/nls_base.c b/fs/nls/nls_base.c index 64965e1c21c4..9b0efdad8910 100644 --- a/fs/nls/nls_base.c +++ b/fs/nls/nls_base.c | |||
@@ -13,9 +13,7 @@ | |||
13 | #include <linux/nls.h> | 13 | #include <linux/nls.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | #ifdef CONFIG_KMOD | ||
17 | #include <linux/kmod.h> | 16 | #include <linux/kmod.h> |
18 | #endif | ||
19 | #include <linux/spinlock.h> | 17 | #include <linux/spinlock.h> |
20 | 18 | ||
21 | static struct nls_table default_table; | 19 | static struct nls_table default_table; |
@@ -215,24 +213,7 @@ static struct nls_table *find_nls(char *charset) | |||
215 | 213 | ||
216 | struct nls_table *load_nls(char *charset) | 214 | struct nls_table *load_nls(char *charset) |
217 | { | 215 | { |
218 | struct nls_table *nls; | 216 | return try_then_request_module(find_nls(charset), "nls_%s", charset); |
219 | #ifdef CONFIG_KMOD | ||
220 | int ret; | ||
221 | #endif | ||
222 | |||
223 | nls = find_nls(charset); | ||
224 | if (nls) | ||
225 | return nls; | ||
226 | |||
227 | #ifdef CONFIG_KMOD | ||
228 | ret = request_module("nls_%s", charset); | ||
229 | if (ret != 0) { | ||
230 | printk("Unable to load NLS charset %s\n", charset); | ||
231 | return NULL; | ||
232 | } | ||
233 | nls = find_nls(charset); | ||
234 | #endif | ||
235 | return nls; | ||
236 | } | 217 | } |
237 | 218 | ||
238 | void unload_nls(struct nls_table *nls) | 219 | void unload_nls(struct nls_table *nls) |
diff --git a/kernel/kmod.c b/kernel/kmod.c index ab7dd08472fc..3d3c3ea3a023 100644 --- a/kernel/kmod.c +++ b/kernel/kmod.c | |||
@@ -113,7 +113,7 @@ int request_module(const char *fmt, ...) | |||
113 | return ret; | 113 | return ret; |
114 | } | 114 | } |
115 | EXPORT_SYMBOL(request_module); | 115 | EXPORT_SYMBOL(request_module); |
116 | #endif /* CONFIG_KMOD */ | 116 | #endif /* CONFIG_MODULES */ |
117 | 117 | ||
118 | struct subprocess_info { | 118 | struct subprocess_info { |
119 | struct work_struct work; | 119 | struct work_struct work; |