Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-f…
Browse files Browse the repository at this point in the history
…or-linus

* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
  module: remove CONFIG_KMOD in comment after #endif
  remove CONFIG_KMOD from fs
  remove CONFIG_KMOD from drivers

Manually fix conflict due to include cleanups in drivers/md/md.c
  • Loading branch information
Linus Torvalds committed Oct 16, 2008
2 parents e4856a7 + 118a906 commit c8d8a23
Show file tree
Hide file tree
Showing 16 changed files with 15 additions and 89 deletions.
4 changes: 0 additions & 4 deletions drivers/media/video/cpia.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@
#include <asm/io.h>
#include <linux/mutex.h>

#ifdef CONFIG_KMOD
#include <linux/kmod.h>
#endif

#include "cpia.h"

static int video_nr = -1;
Expand Down
4 changes: 0 additions & 4 deletions drivers/media/video/usbvision/usbvision-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@

#include <linux/workqueue.h>

#ifdef CONFIG_KMOD
#include <linux/kmod.h>
#endif

#include "usbvision.h"

static unsigned int core_debug;
Expand Down
4 changes: 0 additions & 4 deletions drivers/media/video/usbvision/usbvision-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@

#include <linux/workqueue.h>

#ifdef CONFIG_KMOD
#include <linux/kmod.h>
#endif

#include "usbvision.h"
#include "usbvision-cards.h"

Expand Down
4 changes: 0 additions & 4 deletions drivers/media/video/v4l1-compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@
#include <asm/system.h>
#include <asm/pgtable.h>

#ifdef CONFIG_KMOD
#include <linux/kmod.h>
#endif

static unsigned int debug;
module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "enable debug messages");
Expand Down
4 changes: 0 additions & 4 deletions drivers/media/video/v4l2-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@
#include <media/v4l2-common.h>
#include <media/v4l2-chip-ident.h>

#ifdef CONFIG_KMOD
#include <linux/kmod.h>
#endif

#include <linux/videodev2.h>

MODULE_AUTHOR("Bill Dirks, Justin Schoeman, Gerd Knorr");
Expand Down
5 changes: 1 addition & 4 deletions drivers/media/video/vino.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@
#include <linux/mm.h>
#include <linux/time.h>
#include <linux/version.h>

#ifdef CONFIG_KMOD
#include <linux/kmod.h>
#endif

#include <linux/i2c.h>
#include <linux/i2c-algo-sgi.h>
Expand Down Expand Up @@ -4634,7 +4631,7 @@ static int __init vino_module_init(void)
}
vino_init_stage++;

#if defined(CONFIG_KMOD) && defined(MODULE)
#ifdef MODULE
request_module("saa7191");
request_module("indycam");
#endif
Expand Down
4 changes: 2 additions & 2 deletions drivers/media/video/w9968cf.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ static int specific_debug = W9968CF_SPECIFIC_DEBUG;

static unsigned int param_nv[24]; /* number of values per parameter */

#ifdef CONFIG_KMOD
#ifdef CONFIG_MODULES
module_param(ovmod_load, bool, 0644);
#endif
module_param(simcams, ushort, 0644);
Expand Down Expand Up @@ -144,7 +144,7 @@ module_param(debug, ushort, 0644);
module_param(specific_debug, bool, 0644);
#endif

#ifdef CONFIG_KMOD
#ifdef CONFIG_MODULES
MODULE_PARM_DESC(ovmod_load,
"\n<0|1> Automatic 'ovcamchip' module loading."
"\n0 disabled, 1 enabled."
Expand Down
2 changes: 0 additions & 2 deletions drivers/mtd/mtdpart.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,10 +564,8 @@ int parse_mtd_partitions(struct mtd_info *master, const char **types,

for ( ; ret <= 0 && *types; types++) {
parser = get_partition_parser(*types);
#ifdef CONFIG_KMOD
if (!parser && !request_module("%s", *types))
parser = get_partition_parser(*types);
#endif
if (!parser) {
printk(KERN_NOTICE "%s partition parsing not available\n",
*types);
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/irda/sir_dongle.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ int sirdev_get_dongle(struct sir_dev *dev, IRDA_DONGLE type)
const struct dongle_driver *drv = NULL;
int err = -EINVAL;

#ifdef CONFIG_KMOD
request_module("irda-dongle-%d", type);
#endif

if (dev->dongle_drv != NULL)
return -EBUSY;
Expand Down
10 changes: 3 additions & 7 deletions drivers/net/ppp_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -2127,13 +2127,9 @@ ppp_set_compress(struct ppp *ppp, unsigned long arg)
|| ccp_option[1] < 2 || ccp_option[1] > data.length)
goto out;

cp = find_compressor(ccp_option[0]);
#ifdef CONFIG_KMOD
if (!cp) {
request_module("ppp-compress-%d", ccp_option[0]);
cp = find_compressor(ccp_option[0]);
}
#endif /* CONFIG_KMOD */
cp = try_then_request_module(
find_compressor(ccp_option[0]),
"ppp-compress-%d", ccp_option[0]);
if (!cp)
goto out;

Expand Down
9 changes: 2 additions & 7 deletions drivers/net/pppox.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,8 @@ static int pppox_create(struct net *net, struct socket *sock, int protocol)
goto out;

rc = -EPROTONOSUPPORT;
#ifdef CONFIG_KMOD
if (!pppox_protos[protocol]) {
char buffer[32];
sprintf(buffer, "pppox-proto-%d", protocol);
request_module(buffer);
}
#endif
if (!pppox_protos[protocol])
request_module("pppox-proto-%d", protocol);
if (!pppox_protos[protocol] ||
!try_module_get(pppox_protos[protocol]->owner))
goto out;
Expand Down
17 changes: 2 additions & 15 deletions drivers/video/fbmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/console.h>
#ifdef CONFIG_KMOD
#include <linux/kmod.h>
#endif
#include <linux/err.h>
#include <linux/device.h>
#include <linux/efi.h>
Expand Down Expand Up @@ -837,13 +835,6 @@ fb_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
return (cnt) ? cnt : err;
}

#ifdef CONFIG_KMOD
static void try_to_load(int fb)
{
request_module("fb%d", fb);
}
#endif /* CONFIG_KMOD */

int
fb_pan_display(struct fb_info *info, struct fb_var_screeninfo *var)
{
Expand Down Expand Up @@ -1086,10 +1077,8 @@ fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
return -EINVAL;
if (con2fb.framebuffer < 0 || con2fb.framebuffer >= FB_MAX)
return -EINVAL;
#ifdef CONFIG_KMOD
if (!registered_fb[con2fb.framebuffer])
try_to_load(con2fb.framebuffer);
#endif /* CONFIG_KMOD */
request_module("fb%d", con2fb.framebuffer);
if (!registered_fb[con2fb.framebuffer])
return -EINVAL;
event.info = info;
Expand Down Expand Up @@ -1327,10 +1316,8 @@ fb_open(struct inode *inode, struct file *file)
if (fbidx >= FB_MAX)
return -ENODEV;
lock_kernel();
#ifdef CONFIG_KMOD
if (!(info = registered_fb[fbidx]))
try_to_load(fbidx);
#endif /* CONFIG_KMOD */
request_module("fb%d", fbidx);
if (!(info = registered_fb[fbidx])) {
res = -ENODEV;
goto out;
Expand Down
3 changes: 0 additions & 3 deletions fs/char_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
#include <linux/mutex.h>
#include <linux/backing-dev.h>

#ifdef CONFIG_KMOD
#include <linux/kmod.h>
#endif
#include "internal.h"

/*
Expand Down
9 changes: 3 additions & 6 deletions fs/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,12 @@
#include <linux/cn_proc.h>
#include <linux/audit.h>
#include <linux/tracehook.h>
#include <linux/kmod.h>

#include <asm/uaccess.h>
#include <asm/mmu_context.h>
#include <asm/tlb.h>

#ifdef CONFIG_KMOD
#include <linux/kmod.h>
#endif

#ifdef __alpha__
/* for /sbin/loader handling in search_binary_handler() */
#include <linux/a.out.h>
Expand Down Expand Up @@ -1245,8 +1242,8 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs)
read_unlock(&binfmt_lock);
if (retval != -ENOEXEC || bprm->mm == NULL) {
break;
#ifdef CONFIG_KMOD
}else{
#ifdef CONFIG_MODULES
} else {
#define printable(c) (((c)=='\t') || ((c)=='\n') || (0x20<=(c) && (c)<=0x7e))
if (printable(bprm->buf[0]) &&
printable(bprm->buf[1]) &&
Expand Down
21 changes: 1 addition & 20 deletions fs/nls/nls_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
#include <linux/nls.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#ifdef CONFIG_KMOD
#include <linux/kmod.h>
#endif
#include <linux/spinlock.h>

static struct nls_table default_table;
Expand Down Expand Up @@ -215,24 +213,7 @@ static struct nls_table *find_nls(char *charset)

struct nls_table *load_nls(char *charset)
{
struct nls_table *nls;
#ifdef CONFIG_KMOD
int ret;
#endif

nls = find_nls(charset);
if (nls)
return nls;

#ifdef CONFIG_KMOD
ret = request_module("nls_%s", charset);
if (ret != 0) {
printk("Unable to load NLS charset %s\n", charset);
return NULL;
}
nls = find_nls(charset);
#endif
return nls;
return try_then_request_module(find_nls(charset), "nls_%s", charset);
}

void unload_nls(struct nls_table *nls)
Expand Down
2 changes: 1 addition & 1 deletion kernel/kmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ int request_module(const char *fmt, ...)
return ret;
}
EXPORT_SYMBOL(request_module);
#endif /* CONFIG_KMOD */
#endif /* CONFIG_MODULES */

struct subprocess_info {
struct work_struct work;
Expand Down

0 comments on commit c8d8a23

Please sign in to comment.