aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/md/md.c7
-rw-r--r--drivers/media/video/cpia.c4
-rw-r--r--drivers/media/video/usbvision/usbvision-core.c4
-rw-r--r--drivers/media/video/usbvision/usbvision-video.c4
-rw-r--r--drivers/media/video/v4l1-compat.c4
-rw-r--r--drivers/media/video/v4l2-common.c4
-rw-r--r--drivers/media/video/vino.c5
-rw-r--r--drivers/media/video/w9968cf.c4
-rw-r--r--drivers/mtd/mtdpart.c2
-rw-r--r--drivers/net/irda/sir_dongle.c2
-rw-r--r--drivers/net/ppp_generic.c10
-rw-r--r--drivers/net/pppox.c9
-rw-r--r--drivers/video/fbmem.c17
13 files changed, 10 insertions, 66 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 0a3a4bdcd4af..3323d7647b48 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -44,14 +44,9 @@
44#include <linux/mutex.h> 44#include <linux/mutex.h>
45#include <linux/ctype.h> 45#include <linux/ctype.h>
46#include <linux/freezer.h> 46#include <linux/freezer.h>
47
48#include <linux/init.h> 47#include <linux/init.h>
49
50#include <linux/file.h> 48#include <linux/file.h>
51
52#ifdef CONFIG_KMOD
53#include <linux/kmod.h> 49#include <linux/kmod.h>
54#endif
55 50
56#include <asm/unaligned.h> 51#include <asm/unaligned.h>
57 52
@@ -3555,12 +3550,10 @@ static int do_md_run(mddev_t * mddev)
3555 } 3550 }
3556 } 3551 }
3557 3552
3558#ifdef CONFIG_KMOD
3559 if (mddev->level != LEVEL_NONE) 3553 if (mddev->level != LEVEL_NONE)
3560 request_module("md-level-%d", mddev->level); 3554 request_module("md-level-%d", mddev->level);
3561 else if (mddev->clevel[0]) 3555 else if (mddev->clevel[0])
3562 request_module("md-%s", mddev->clevel); 3556 request_module("md-%s", mddev->clevel);
3563#endif
3564 3557
3565 /* 3558 /*
3566 * Drop all container device buffers, from now on 3559 * Drop all container device buffers, from now on
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
48static int video_nr = -1; 44static 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
54static unsigned int core_debug; 50static 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
43static unsigned int debug; 39static unsigned int debug;
44module_param(debug, int, 0644); 40module_param(debug, int, 0644);
45MODULE_PARM_DESC(debug, "enable debug messages"); 41MODULE_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
69MODULE_AUTHOR("Bill Dirks, Justin Schoeman, Gerd Knorr"); 65MODULE_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
112static unsigned int param_nv[24]; /* number of values per parameter */ 112static unsigned int param_nv[24]; /* number of values per parameter */
113 113
114#ifdef CONFIG_KMOD 114#ifdef CONFIG_MODULES
115module_param(ovmod_load, bool, 0644); 115module_param(ovmod_load, bool, 0644);
116#endif 116#endif
117module_param(simcams, ushort, 0644); 117module_param(simcams, ushort, 0644);
@@ -144,7 +144,7 @@ module_param(debug, ushort, 0644);
144module_param(specific_debug, bool, 0644); 144module_param(specific_debug, bool, 0644);
145#endif 145#endif
146 146
147#ifdef CONFIG_KMOD 147#ifdef CONFIG_MODULES
148MODULE_PARM_DESC(ovmod_load, 148MODULE_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
841static void try_to_load(int fb)
842{
843 request_module("fb%d", fb);
844}
845#endif /* CONFIG_KMOD */
846
847int 838int
848fb_pan_display(struct fb_info *info, struct fb_var_screeninfo *var) 839fb_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;