diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-11-22 01:45:04 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-01-25 03:14:05 -0500 |
commit | 479e64c21038326f4fe429b4ffb7ea6d3175c2dc (patch) | |
tree | 420b7afecaa71d3c642600a271571dd48e998940 /fs/nls/nls_base.c | |
parent | 36a7411724b1caf2fa92b5e4a41576ee8f16769e (diff) | |
download | lwn-479e64c21038326f4fe429b4ffb7ea6d3175c2dc.tar.gz lwn-479e64c21038326f4fe429b4ffb7ea6d3175c2dc.zip |
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.c | 5 |
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, } EXPORT_SYMBOL(utf16s_to_utf8s); -int register_nls(struct nls_table * nls) +int __register_nls(struct nls_table *nls, struct module *owner) { struct nls_table ** tmp = &tables; if (nls->next) return -EBUSY; + nls->owner = owner; spin_lock(&nls_lock); while (*tmp) { if (nls == *tmp) { @@ -252,6 +253,7 @@ int register_nls(struct nls_table * nls) spin_unlock(&nls_lock); return 0; } +EXPORT_SYMBOL(__register_nls); int unregister_nls(struct nls_table * nls) { @@ -538,7 +540,6 @@ struct nls_table *load_nls_default(void) return &default_table; } -EXPORT_SYMBOL(register_nls); EXPORT_SYMBOL(unregister_nls); EXPORT_SYMBOL(unload_nls); EXPORT_SYMBOL(load_nls); |