aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nls/nls_base.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-11-22 01:45:04 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2014-01-25 03:14:05 -0500
commit479e64c21038326f4fe429b4ffb7ea6d3175c2dc (patch)
tree420b7afecaa71d3c642600a271571dd48e998940 /fs/nls/nls_base.c
parent36a7411724b1caf2fa92b5e4a41576ee8f16769e (diff)
nls: have register_nls() set ->owner
pass owner explicitly to __register_nls(), make register_nls() a macro passing THIS_MODULE as the owner argument to __register_nls(). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/nls/nls_base.c')
-rw-r--r--fs/nls/nls_base.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/nls/nls_base.c b/fs/nls/nls_base.c
index fea6bd5831dc..52ccd34b1e79 100644
--- a/fs/nls/nls_base.c
+++ b/fs/nls/nls_base.c
@@ -232,13 +232,14 @@ int utf16s_to_utf8s(const wchar_t *pwcs, int inlen, enum utf16_endian endian,
232} 232}
233EXPORT_SYMBOL(utf16s_to_utf8s); 233EXPORT_SYMBOL(utf16s_to_utf8s);
234 234
235int register_nls(struct nls_table * nls) 235int __register_nls(struct nls_table *nls, struct module *owner)
236{ 236{
237 struct nls_table ** tmp = &tables; 237 struct nls_table ** tmp = &tables;
238 238
239 if (nls->next) 239 if (nls->next)
240 return -EBUSY; 240 return -EBUSY;
241 241
242 nls->owner = owner;
242 spin_lock(&nls_lock); 243 spin_lock(&nls_lock);
243 while (*tmp) { 244 while (*tmp) {
244 if (nls == *tmp) { 245 if (nls == *tmp) {
@@ -252,6 +253,7 @@ int register_nls(struct nls_table * nls)
252 spin_unlock(&nls_lock); 253 spin_unlock(&nls_lock);
253 return 0; 254 return 0;
254} 255}
256EXPORT_SYMBOL(__register_nls);
255 257
256int unregister_nls(struct nls_table * nls) 258int unregister_nls(struct nls_table * nls)
257{ 259{
@@ -538,7 +540,6 @@ struct nls_table *load_nls_default(void)
538 return &default_table; 540 return &default_table;
539} 541}
540 542
541EXPORT_SYMBOL(register_nls);
542EXPORT_SYMBOL(unregister_nls); 543EXPORT_SYMBOL(unregister_nls);
543EXPORT_SYMBOL(unload_nls); 544EXPORT_SYMBOL(unload_nls);
544EXPORT_SYMBOL(load_nls); 545EXPORT_SYMBOL(load_nls);