X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fnls%2Fnls_base.c;h=7dfdab98729bfd30666e71f8a34ad4ea375a7543;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=07b8bea20dc2416b719140bff2fa3f1b4870c2dc;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/fs/nls/nls_base.c b/fs/nls/nls_base.c index 07b8bea20..7dfdab987 100644 --- a/fs/nls/nls_base.c +++ b/fs/nls/nls_base.c @@ -1,5 +1,5 @@ /* - * linux/fs/nls_base.c + * linux/fs/nls/nls_base.c * * Native language support--charsets and unicode translations. * By Gordon Chaffee 1996, 1997 @@ -10,7 +10,6 @@ #include #include -#include #include #include #include @@ -21,7 +20,7 @@ static struct nls_table default_table; static struct nls_table *tables = &default_table; -static spinlock_t nls_lock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(nls_lock); /* * Sample implementation from Unicode home page. @@ -164,8 +163,6 @@ int register_nls(struct nls_table * nls) { struct nls_table ** tmp = &tables; - if (!nls) - return -EINVAL; if (nls->next) return -EBUSY; @@ -243,7 +240,7 @@ void unload_nls(struct nls_table *nls) module_put(nls->owner); } -wchar_t charset2uni[256] = { +static wchar_t charset2uni[256] = { /* 0x00*/ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,