vserver 1.9.5.x5
[linux-2.6.git] / drivers / char / nvram.c
index b5f32d6..f63a3fd 100644 (file)
 #include <asm/uaccess.h>
 #include <asm/system.h>
 
-static spinlock_t nvram_state_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(nvram_state_lock);
 static int nvram_open_cnt;     /* #times opened */
 static int nvram_open_mode;    /* special open modes */
 #define NVRAM_WRITE            1 /* opened for writing (exclusive) */
@@ -467,7 +467,7 @@ nvram_init(void)
                    NVRAM_MINOR);
                goto out;
        }
-       if (!create_proc_read_entry("driver/nvram", 0, 0, nvram_read_proc,
+       if (!create_proc_read_entry("driver/nvram", 0, NULL, nvram_read_proc,
                NULL)) {
                printk(KERN_ERR "nvram: can't create /proc/driver/nvram\n");
                ret = -ENOMEM;
@@ -485,7 +485,7 @@ nvram_init(void)
 static void __exit
 nvram_cleanup_module(void)
 {
-       remove_proc_entry("driver/nvram", 0);
+       remove_proc_entry("driver/nvram", NULL);
        misc_deregister(&nvram_dev);
 }