Revert "fs/nls: make load_nls() take a const parameter"

This reverts commit b796adfc98 which is
commit c1ed39ec116272935528ca9b348b8ee79b0791da upstream.

It changes the signature of a ABI-frozen function, while nice to have,
isn't actually needed right now, so revert it to preserve the Android
abi.

Bug: 161946584
Change-Id: I49f5124db00ac2aedd5d96c3aedde80c4ad11664
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman 2023-09-30 15:35:28 +00:00
parent 4d59a2c9b9
commit 13c2fe5c0a
2 changed files with 3 additions and 3 deletions

View File

@ -272,7 +272,7 @@ int unregister_nls(struct nls_table * nls)
return -EINVAL;
}
static struct nls_table *find_nls(const char *charset)
static struct nls_table *find_nls(char *charset)
{
struct nls_table *nls;
spin_lock(&nls_lock);
@ -288,7 +288,7 @@ static struct nls_table *find_nls(const char *charset)
return nls;
}
struct nls_table *load_nls(const char *charset)
struct nls_table *load_nls(char *charset)
{
return try_then_request_module(find_nls(charset), "nls_%s", charset);
}

View File

@ -47,7 +47,7 @@ enum utf16_endian {
/* nls_base.c */
extern int __register_nls(struct nls_table *, struct module *);
extern int unregister_nls(struct nls_table *);
extern struct nls_table *load_nls(const char *charset);
extern struct nls_table *load_nls(char *);
extern void unload_nls(struct nls_table *);
extern struct nls_table *load_nls_default(void);
#define register_nls(nls) __register_nls((nls), THIS_MODULE)