Skip to content

Commit

Permalink
nls: have register_nls() set ->owner
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Al Viro committed Jan 25, 2014
1 parent 36a7411 commit 479e64c
Show file tree
Hide file tree
Showing 53 changed files with 5 additions and 54 deletions.
1 change: 0 additions & 1 deletion fs/nls/mac-celtic.c
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_macceltic(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/mac-centeuro.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_maccenteuro(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/mac-croatian.c
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_maccroatian(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/mac-cyrillic.c
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_maccyrillic(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/mac-gaelic.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_macgaelic(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/mac-greek.c
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_macgreek(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/mac-iceland.c
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_maciceland(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/mac-inuit.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_macinuit(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/mac-roman.c
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_macroman(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/mac-romanian.c
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_macromanian(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/mac-turkish.c
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_macturkish(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/nls_ascii.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_ascii(void)
Expand Down
5 changes: 3 additions & 2 deletions fs/nls/nls_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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)
{
Expand Down Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion fs/nls/nls_cp1250.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_cp1250(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/nls_cp1251.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_cp1251(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/nls_cp1255.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_cp1255(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/nls_cp437.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_cp437(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/nls_cp737.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_cp737(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/nls_cp775.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_cp775(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/nls_cp850.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_cp850(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/nls_cp852.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_cp852(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/nls_cp855.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_cp855(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/nls_cp857.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_cp857(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/nls_cp860.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_cp860(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/nls_cp861.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_cp861(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/nls_cp862.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_cp862(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/nls_cp863.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_cp863(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/nls_cp864.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_cp864(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/nls_cp865.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_cp865(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/nls_cp866.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_cp866(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/nls_cp869.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_cp869(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/nls_cp874.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_cp874(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/nls_cp932.c
Original file line number Diff line number Diff line change
Expand Up @@ -7914,7 +7914,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_cp932(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/nls_cp936.c
Original file line number Diff line number Diff line change
Expand Up @@ -11092,7 +11092,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_cp936(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/nls_cp949.c
Original file line number Diff line number Diff line change
Expand Up @@ -13927,7 +13927,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_cp949(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/nls_cp950.c
Original file line number Diff line number Diff line change
Expand Up @@ -9463,7 +9463,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_cp950(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/nls_euc-jp.c
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,6 @@ static struct nls_table table = {
.charset = "euc-jp",
.uni2char = uni2char,
.char2uni = char2uni,
.owner = THIS_MODULE,
};

static int __init init_nls_euc_jp(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/nls_iso8859-1.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_iso8859_1(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/nls_iso8859-13.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_iso8859_13(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/nls_iso8859-14.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_iso8859_14(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/nls_iso8859-15.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_iso8859_15(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/nls_iso8859-2.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_iso8859_2(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/nls_iso8859-3.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_iso8859_3(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/nls_iso8859-4.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_iso8859_4(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/nls_iso8859-5.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_iso8859_5(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/nls_iso8859-6.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_iso8859_6(void)
Expand Down
1 change: 0 additions & 1 deletion fs/nls/nls_iso8859-7.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@ static struct nls_table table = {
.char2uni = char2uni,
.charset2lower = charset2lower,
.charset2upper = charset2upper,
.owner = THIS_MODULE,
};

static int __init init_nls_iso8859_7(void)
Expand Down
Loading

0 comments on commit 479e64c

Please sign in to comment.