diff options
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) |