diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-07-09 04:28:40 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-10-16 11:38:36 -0400 |
commit | 5f4123be3cdb1dbd77fa9d6d2bb96bb9689a0a19 (patch) | |
tree | e636c2ae7d5a5459f4f4625d44754737f45a984f /fs/nls/nls_base.c | |
parent | a65e5d782f9db2a61a914dc01a329e0c2dcf92a1 (diff) |
remove CONFIG_KMOD from fs
Just always compile the code when the kernel is modular.
Convert load_nls to use try_then_request_module to tidy
up the code.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'fs/nls/nls_base.c')
-rw-r--r-- | fs/nls/nls_base.c | 21 |
1 files changed, 1 insertions, 20 deletions
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) |