fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / fs / nls / nls_base.c
index 07b8bea..7dfdab9 100644 (file)
@@ -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 <linux/module.h>
 #include <linux/string.h>
-#include <linux/config.h>
 #include <linux/nls.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
@@ -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,