summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorWinston Wen <wentao@uniontech.com>2023-07-24 10:10:56 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-09-23 10:46:53 +0200
commit544333d62418ff4bf7283a2221ec726489a18c4f (patch)
treec5b106f515e04d0cfacb7f3c4be01f9ed959a319 /include
parent53f9e32f0e5119f307f3b0fb030ffa524225bcb6 (diff)
downloadlinux-544333d62418ff4bf7283a2221ec726489a18c4f.tar.gz
linux-544333d62418ff4bf7283a2221ec726489a18c4f.tar.bz2
linux-544333d62418ff4bf7283a2221ec726489a18c4f.zip
fs/nls: make load_nls() take a const parameter
[ Upstream commit c1ed39ec116272935528ca9b348b8ee79b0791da ] load_nls() take a char * parameter, use it to find nls module in list or construct the module name to load it. This change make load_nls() take a const parameter, so we don't need do some cast like this: ses->local_nls = load_nls((char *)ctx->local_nls->charset); Suggested-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Winston Wen <wentao@uniontech.com> Reviewed-by: Paulo Alcantara <pc@manguebit.com> Reviewed-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/nls.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/nls.h b/include/linux/nls.h
index 499e486b3722..e0bf8367b274 100644
--- a/include/linux/nls.h
+++ b/include/linux/nls.h
@@ -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(char *);
+extern struct nls_table *load_nls(const char *charset);
extern void unload_nls(struct nls_table *);
extern struct nls_table *load_nls_default(void);
#define register_nls(nls) __register_nls((nls), THIS_MODULE)