diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2014-01-23 18:55:45 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-23 19:37:02 -0500 |
commit | abaf3787ac26ba33e2f75e76b1174c32254c25b0 (patch) | |
tree | 4ee0428fc9038c62125c775d0cb8be946a9de842 /fs/proc | |
parent | 3d93116cef306bd516a7645e7b4895d1d0ceec2b (diff) |
fs/proc: don't use module_init for non-modular core code
PROC_FS is a bool, so this code is either present or absent. It will
never be modular, so using module_init as an alias for __initcall is
rather misleading.
Fix this up now, so that we can relocate module_init from init.h into
module.h in the future. If we don't do this, we'd have to add module.h to
obviously non-modular code, and that would be ugly at best.
Note that direct use of __initcall is discouraged, vs. one of the
priority categorized subgroups. As __initcall gets mapped onto
device_initcall, our use of fs_initcall (which makes sense for fs code)
will thus change these registrations from level 6-device to level 5-fs
(i.e. slightly earlier). However no observable impact of that small
difference has been observed during testing, or is expected.
Also note that this change uncovers a missing semicolon bug in the
registration of vmcore_init as an initcall.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/proc')
-rw-r--r-- | fs/proc/cmdline.c | 2 | ||||
-rw-r--r-- | fs/proc/consoles.c | 2 | ||||
-rw-r--r-- | fs/proc/cpuinfo.c | 2 | ||||
-rw-r--r-- | fs/proc/devices.c | 2 | ||||
-rw-r--r-- | fs/proc/interrupts.c | 2 | ||||
-rw-r--r-- | fs/proc/kcore.c | 2 | ||||
-rw-r--r-- | fs/proc/kmsg.c | 2 | ||||
-rw-r--r-- | fs/proc/loadavg.c | 2 | ||||
-rw-r--r-- | fs/proc/meminfo.c | 2 | ||||
-rw-r--r-- | fs/proc/nommu.c | 2 | ||||
-rw-r--r-- | fs/proc/page.c | 2 | ||||
-rw-r--r-- | fs/proc/softirqs.c | 2 | ||||
-rw-r--r-- | fs/proc/stat.c | 2 | ||||
-rw-r--r-- | fs/proc/uptime.c | 2 | ||||
-rw-r--r-- | fs/proc/version.c | 2 | ||||
-rw-r--r-- | fs/proc/vmcore.c | 2 |
16 files changed, 16 insertions, 16 deletions
diff --git a/fs/proc/cmdline.c b/fs/proc/cmdline.c index 82676e3fcd1d..cbd82dff7e81 100644 --- a/fs/proc/cmdline.c +++ b/fs/proc/cmdline.c | |||
@@ -26,4 +26,4 @@ static int __init proc_cmdline_init(void) | |||
26 | proc_create("cmdline", 0, NULL, &cmdline_proc_fops); | 26 | proc_create("cmdline", 0, NULL, &cmdline_proc_fops); |
27 | return 0; | 27 | return 0; |
28 | } | 28 | } |
29 | module_init(proc_cmdline_init); | 29 | fs_initcall(proc_cmdline_init); |
diff --git a/fs/proc/consoles.c b/fs/proc/consoles.c index 51942d5abcec..290ba85cb900 100644 --- a/fs/proc/consoles.c +++ b/fs/proc/consoles.c | |||
@@ -109,4 +109,4 @@ static int __init proc_consoles_init(void) | |||
109 | proc_create("consoles", 0, NULL, &proc_consoles_operations); | 109 | proc_create("consoles", 0, NULL, &proc_consoles_operations); |
110 | return 0; | 110 | return 0; |
111 | } | 111 | } |
112 | module_init(proc_consoles_init); | 112 | fs_initcall(proc_consoles_init); |
diff --git a/fs/proc/cpuinfo.c b/fs/proc/cpuinfo.c index 5a1e539a234b..06f4d31e0396 100644 --- a/fs/proc/cpuinfo.c +++ b/fs/proc/cpuinfo.c | |||
@@ -21,4 +21,4 @@ static int __init proc_cpuinfo_init(void) | |||
21 | proc_create("cpuinfo", 0, NULL, &proc_cpuinfo_operations); | 21 | proc_create("cpuinfo", 0, NULL, &proc_cpuinfo_operations); |
22 | return 0; | 22 | return 0; |
23 | } | 23 | } |
24 | module_init(proc_cpuinfo_init); | 24 | fs_initcall(proc_cpuinfo_init); |
diff --git a/fs/proc/devices.c b/fs/proc/devices.c index b14347167c35..50493edc30e5 100644 --- a/fs/proc/devices.c +++ b/fs/proc/devices.c | |||
@@ -67,4 +67,4 @@ static int __init proc_devices_init(void) | |||
67 | proc_create("devices", 0, NULL, &proc_devinfo_operations); | 67 | proc_create("devices", 0, NULL, &proc_devinfo_operations); |
68 | return 0; | 68 | return 0; |
69 | } | 69 | } |
70 | module_init(proc_devices_init); | 70 | fs_initcall(proc_devices_init); |
diff --git a/fs/proc/interrupts.c b/fs/proc/interrupts.c index 05029c0e2f24..a352d5703b41 100644 --- a/fs/proc/interrupts.c +++ b/fs/proc/interrupts.c | |||
@@ -50,4 +50,4 @@ static int __init proc_interrupts_init(void) | |||
50 | proc_create("interrupts", 0, NULL, &proc_interrupts_operations); | 50 | proc_create("interrupts", 0, NULL, &proc_interrupts_operations); |
51 | return 0; | 51 | return 0; |
52 | } | 52 | } |
53 | module_init(proc_interrupts_init); | 53 | fs_initcall(proc_interrupts_init); |
diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c index 5ed0e52d6aa0..39e6ef32f0bd 100644 --- a/fs/proc/kcore.c +++ b/fs/proc/kcore.c | |||
@@ -639,4 +639,4 @@ static int __init proc_kcore_init(void) | |||
639 | 639 | ||
640 | return 0; | 640 | return 0; |
641 | } | 641 | } |
642 | module_init(proc_kcore_init); | 642 | fs_initcall(proc_kcore_init); |
diff --git a/fs/proc/kmsg.c b/fs/proc/kmsg.c index bdfabdaefdce..05f8dcdb086e 100644 --- a/fs/proc/kmsg.c +++ b/fs/proc/kmsg.c | |||
@@ -61,4 +61,4 @@ static int __init proc_kmsg_init(void) | |||
61 | proc_create("kmsg", S_IRUSR, NULL, &proc_kmsg_operations); | 61 | proc_create("kmsg", S_IRUSR, NULL, &proc_kmsg_operations); |
62 | return 0; | 62 | return 0; |
63 | } | 63 | } |
64 | module_init(proc_kmsg_init); | 64 | fs_initcall(proc_kmsg_init); |
diff --git a/fs/proc/loadavg.c b/fs/proc/loadavg.c index 1afa4dd4cae2..aec66e6c2060 100644 --- a/fs/proc/loadavg.c +++ b/fs/proc/loadavg.c | |||
@@ -42,4 +42,4 @@ static int __init proc_loadavg_init(void) | |||
42 | proc_create("loadavg", 0, NULL, &loadavg_proc_fops); | 42 | proc_create("loadavg", 0, NULL, &loadavg_proc_fops); |
43 | return 0; | 43 | return 0; |
44 | } | 44 | } |
45 | module_init(proc_loadavg_init); | 45 | fs_initcall(proc_loadavg_init); |
diff --git a/fs/proc/meminfo.c b/fs/proc/meminfo.c index 24270eceddbf..136e548d9567 100644 --- a/fs/proc/meminfo.c +++ b/fs/proc/meminfo.c | |||
@@ -220,4 +220,4 @@ static int __init proc_meminfo_init(void) | |||
220 | proc_create("meminfo", 0, NULL, &meminfo_proc_fops); | 220 | proc_create("meminfo", 0, NULL, &meminfo_proc_fops); |
221 | return 0; | 221 | return 0; |
222 | } | 222 | } |
223 | module_init(proc_meminfo_init); | 223 | fs_initcall(proc_meminfo_init); |
diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c index 5f9bc8a746c9..d4a35746cab9 100644 --- a/fs/proc/nommu.c +++ b/fs/proc/nommu.c | |||
@@ -131,4 +131,4 @@ static int __init proc_nommu_init(void) | |||
131 | return 0; | 131 | return 0; |
132 | } | 132 | } |
133 | 133 | ||
134 | module_init(proc_nommu_init); | 134 | fs_initcall(proc_nommu_init); |
diff --git a/fs/proc/page.c b/fs/proc/page.c index cab84b6272ed..02174a610315 100644 --- a/fs/proc/page.c +++ b/fs/proc/page.c | |||
@@ -219,4 +219,4 @@ static int __init proc_page_init(void) | |||
219 | proc_create("kpageflags", S_IRUSR, NULL, &proc_kpageflags_operations); | 219 | proc_create("kpageflags", S_IRUSR, NULL, &proc_kpageflags_operations); |
220 | return 0; | 220 | return 0; |
221 | } | 221 | } |
222 | module_init(proc_page_init); | 222 | fs_initcall(proc_page_init); |
diff --git a/fs/proc/softirqs.c b/fs/proc/softirqs.c index 62604be9f58d..ad8a77f94beb 100644 --- a/fs/proc/softirqs.c +++ b/fs/proc/softirqs.c | |||
@@ -41,4 +41,4 @@ static int __init proc_softirqs_init(void) | |||
41 | proc_create("softirqs", 0, NULL, &proc_softirqs_operations); | 41 | proc_create("softirqs", 0, NULL, &proc_softirqs_operations); |
42 | return 0; | 42 | return 0; |
43 | } | 43 | } |
44 | module_init(proc_softirqs_init); | 44 | fs_initcall(proc_softirqs_init); |
diff --git a/fs/proc/stat.c b/fs/proc/stat.c index 1cf86c0e8689..6f599c62f0cc 100644 --- a/fs/proc/stat.c +++ b/fs/proc/stat.c | |||
@@ -221,4 +221,4 @@ static int __init proc_stat_init(void) | |||
221 | proc_create("stat", 0, NULL, &proc_stat_operations); | 221 | proc_create("stat", 0, NULL, &proc_stat_operations); |
222 | return 0; | 222 | return 0; |
223 | } | 223 | } |
224 | module_init(proc_stat_init); | 224 | fs_initcall(proc_stat_init); |
diff --git a/fs/proc/uptime.c b/fs/proc/uptime.c index 061894625903..7141b8d0ca9e 100644 --- a/fs/proc/uptime.c +++ b/fs/proc/uptime.c | |||
@@ -49,4 +49,4 @@ static int __init proc_uptime_init(void) | |||
49 | proc_create("uptime", 0, NULL, &uptime_proc_fops); | 49 | proc_create("uptime", 0, NULL, &uptime_proc_fops); |
50 | return 0; | 50 | return 0; |
51 | } | 51 | } |
52 | module_init(proc_uptime_init); | 52 | fs_initcall(proc_uptime_init); |
diff --git a/fs/proc/version.c b/fs/proc/version.c index 76817a60678c..d2154eb6d78f 100644 --- a/fs/proc/version.c +++ b/fs/proc/version.c | |||
@@ -31,4 +31,4 @@ static int __init proc_version_init(void) | |||
31 | proc_create("version", 0, NULL, &version_proc_fops); | 31 | proc_create("version", 0, NULL, &version_proc_fops); |
32 | return 0; | 32 | return 0; |
33 | } | 33 | } |
34 | module_init(proc_version_init); | 34 | fs_initcall(proc_version_init); |
diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c index 9100d6959886..2ca7ba047f04 100644 --- a/fs/proc/vmcore.c +++ b/fs/proc/vmcore.c | |||
@@ -1082,7 +1082,7 @@ static int __init vmcore_init(void) | |||
1082 | proc_vmcore->size = vmcore_size; | 1082 | proc_vmcore->size = vmcore_size; |
1083 | return 0; | 1083 | return 0; |
1084 | } | 1084 | } |
1085 | module_init(vmcore_init) | 1085 | fs_initcall(vmcore_init); |
1086 | 1086 | ||
1087 | /* Cleanup function for vmcore module. */ | 1087 | /* Cleanup function for vmcore module. */ |
1088 | void vmcore_cleanup(void) | 1088 | void vmcore_cleanup(void) |