Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

remove CONFIG_KMOD from drivers

Straight forward conversions to CONFIG_MODULE; many drivers
include <linux/kmod.h> conditionally and then don't have any
other conditional code so remove it from those.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: video4linux-list@redhat.com
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: linux-ppp@vger.kernel.org
Cc: dm-devel@redhat.com
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

authored by

Johannes Berg and committed by
Rusty Russell
a65e5d78 04ab5918

+10 -66
-7
drivers/md/md.c
··· 44 44 #include <linux/mutex.h> 45 45 #include <linux/ctype.h> 46 46 #include <linux/freezer.h> 47 - 48 47 #include <linux/init.h> 49 - 50 48 #include <linux/file.h> 51 - 52 - #ifdef CONFIG_KMOD 53 49 #include <linux/kmod.h> 54 - #endif 55 50 56 51 #include <asm/unaligned.h> 57 52 ··· 3550 3555 } 3551 3556 } 3552 3557 3553 - #ifdef CONFIG_KMOD 3554 3558 if (mddev->level != LEVEL_NONE) 3555 3559 request_module("md-level-%d", mddev->level); 3556 3560 else if (mddev->clevel[0]) 3557 3561 request_module("md-%s", mddev->clevel); 3558 - #endif 3559 3562 3560 3563 /* 3561 3564 * Drop all container device buffers, from now on
-4
drivers/media/video/cpia.c
··· 39 39 #include <asm/io.h> 40 40 #include <linux/mutex.h> 41 41 42 - #ifdef CONFIG_KMOD 43 - #include <linux/kmod.h> 44 - #endif 45 - 46 42 #include "cpia.h" 47 43 48 44 static int video_nr = -1;
-4
drivers/media/video/usbvision/usbvision-core.c
··· 45 45 46 46 #include <linux/workqueue.h> 47 47 48 - #ifdef CONFIG_KMOD 49 - #include <linux/kmod.h> 50 - #endif 51 - 52 48 #include "usbvision.h" 53 49 54 50 static unsigned int core_debug;
-4
drivers/media/video/usbvision/usbvision-video.c
··· 69 69 70 70 #include <linux/workqueue.h> 71 71 72 - #ifdef CONFIG_KMOD 73 - #include <linux/kmod.h> 74 - #endif 75 - 76 72 #include "usbvision.h" 77 73 #include "usbvision-cards.h" 78 74
-4
drivers/media/video/v4l1-compat.c
··· 36 36 #include <asm/system.h> 37 37 #include <asm/pgtable.h> 38 38 39 - #ifdef CONFIG_KMOD 40 - #include <linux/kmod.h> 41 - #endif 42 - 43 39 static unsigned int debug; 44 40 module_param(debug, int, 0644); 45 41 MODULE_PARM_DESC(debug, "enable debug messages");
-4
drivers/media/video/v4l2-common.c
··· 60 60 #include <media/v4l2-common.h> 61 61 #include <media/v4l2-chip-ident.h> 62 62 63 - #ifdef CONFIG_KMOD 64 - #include <linux/kmod.h> 65 - #endif 66 - 67 63 #include <linux/videodev2.h> 68 64 69 65 MODULE_AUTHOR("Bill Dirks, Justin Schoeman, Gerd Knorr");
+1 -4
drivers/media/video/vino.c
··· 30 30 #include <linux/mm.h> 31 31 #include <linux/time.h> 32 32 #include <linux/version.h> 33 - 34 - #ifdef CONFIG_KMOD 35 33 #include <linux/kmod.h> 36 - #endif 37 34 38 35 #include <linux/i2c.h> 39 36 #include <linux/i2c-algo-sgi.h> ··· 4631 4634 } 4632 4635 vino_init_stage++; 4633 4636 4634 - #if defined(CONFIG_KMOD) && defined(MODULE) 4637 + #ifdef MODULE 4635 4638 request_module("saa7191"); 4636 4639 request_module("indycam"); 4637 4640 #endif
+2 -2
drivers/media/video/w9968cf.c
··· 111 111 112 112 static unsigned int param_nv[24]; /* number of values per parameter */ 113 113 114 - #ifdef CONFIG_KMOD 114 + #ifdef CONFIG_MODULES 115 115 module_param(ovmod_load, bool, 0644); 116 116 #endif 117 117 module_param(simcams, ushort, 0644); ··· 144 144 module_param(specific_debug, bool, 0644); 145 145 #endif 146 146 147 - #ifdef CONFIG_KMOD 147 + #ifdef CONFIG_MODULES 148 148 MODULE_PARM_DESC(ovmod_load, 149 149 "\n<0|1> Automatic 'ovcamchip' module loading." 150 150 "\n0 disabled, 1 enabled."
-2
drivers/mtd/mtdpart.c
··· 564 564 565 565 for ( ; ret <= 0 && *types; types++) { 566 566 parser = get_partition_parser(*types); 567 - #ifdef CONFIG_KMOD 568 567 if (!parser && !request_module("%s", *types)) 569 568 parser = get_partition_parser(*types); 570 - #endif 571 569 if (!parser) { 572 570 printk(KERN_NOTICE "%s partition parsing not available\n", 573 571 *types);
-2
drivers/net/irda/sir_dongle.c
··· 67 67 const struct dongle_driver *drv = NULL; 68 68 int err = -EINVAL; 69 69 70 - #ifdef CONFIG_KMOD 71 70 request_module("irda-dongle-%d", type); 72 - #endif 73 71 74 72 if (dev->dongle_drv != NULL) 75 73 return -EBUSY;
+3 -7
drivers/net/ppp_generic.c
··· 2127 2127 || ccp_option[1] < 2 || ccp_option[1] > data.length) 2128 2128 goto out; 2129 2129 2130 - cp = find_compressor(ccp_option[0]); 2131 - #ifdef CONFIG_KMOD 2132 - if (!cp) { 2133 - request_module("ppp-compress-%d", ccp_option[0]); 2134 - cp = find_compressor(ccp_option[0]); 2135 - } 2136 - #endif /* CONFIG_KMOD */ 2130 + cp = try_then_request_module( 2131 + find_compressor(ccp_option[0]), 2132 + "ppp-compress-%d", ccp_option[0]); 2137 2133 if (!cp) 2138 2134 goto out; 2139 2135
+2 -7
drivers/net/pppox.c
··· 115 115 goto out; 116 116 117 117 rc = -EPROTONOSUPPORT; 118 - #ifdef CONFIG_KMOD 119 - if (!pppox_protos[protocol]) { 120 - char buffer[32]; 121 - sprintf(buffer, "pppox-proto-%d", protocol); 122 - request_module(buffer); 123 - } 124 - #endif 118 + if (!pppox_protos[protocol]) 119 + request_module("pppox-proto-%d", protocol); 125 120 if (!pppox_protos[protocol] || 126 121 !try_module_get(pppox_protos[protocol]->owner)) 127 122 goto out;
+2 -15
drivers/video/fbmem.c
··· 28 28 #include <linux/proc_fs.h> 29 29 #include <linux/seq_file.h> 30 30 #include <linux/console.h> 31 - #ifdef CONFIG_KMOD 32 31 #include <linux/kmod.h> 33 - #endif 34 32 #include <linux/err.h> 35 33 #include <linux/device.h> 36 34 #include <linux/efi.h> ··· 835 837 return (cnt) ? cnt : err; 836 838 } 837 839 838 - #ifdef CONFIG_KMOD 839 - static void try_to_load(int fb) 840 - { 841 - request_module("fb%d", fb); 842 - } 843 - #endif /* CONFIG_KMOD */ 844 - 845 840 int 846 841 fb_pan_display(struct fb_info *info, struct fb_var_screeninfo *var) 847 842 { ··· 1077 1086 return -EINVAL; 1078 1087 if (con2fb.framebuffer < 0 || con2fb.framebuffer >= FB_MAX) 1079 1088 return -EINVAL; 1080 - #ifdef CONFIG_KMOD 1081 1089 if (!registered_fb[con2fb.framebuffer]) 1082 - try_to_load(con2fb.framebuffer); 1083 - #endif /* CONFIG_KMOD */ 1090 + request_module("fb%d", con2fb.framebuffer); 1084 1091 if (!registered_fb[con2fb.framebuffer]) 1085 1092 return -EINVAL; 1086 1093 event.info = info; ··· 1316 1327 if (fbidx >= FB_MAX) 1317 1328 return -ENODEV; 1318 1329 lock_kernel(); 1319 - #ifdef CONFIG_KMOD 1320 1330 if (!(info = registered_fb[fbidx])) 1321 - try_to_load(fbidx); 1322 - #endif /* CONFIG_KMOD */ 1331 + request_module("fb%d", fbidx); 1323 1332 if (!(info = registered_fb[fbidx])) { 1324 1333 res = -ENODEV; 1325 1334 goto out;