Pull acpi_os_free into release branch
[powerpc.git] / drivers / isdn / capi / capifs.c
index 3abd7fc..9ea6bd0 100644 (file)
@@ -15,6 +15,9 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/ctype.h>
+#include <linux/sched.h>       /* current */
+
+#include "capifs.h"
 
 MODULE_DESCRIPTION("CAPI4Linux: /dev/capi/ filesystem");
 MODULE_AUTHOR("Carsten Paeth");
@@ -118,10 +121,10 @@ fail:
        return -ENOMEM;
 }
 
-static struct super_block *capifs_get_sb(struct file_system_type *fs_type,
-       int flags, const char *dev_name, void *data)
+static int capifs_get_sb(struct file_system_type *fs_type,
+       int flags, const char *dev_name, void *data, struct vfsmount *mnt)
 {
-       return get_sb_single(fs_type, flags, data, capifs_fill_super);
+       return get_sb_single(fs_type, flags, data, capifs_fill_super, mnt);
 }
 
 static struct file_system_type capifs_fs_type = {
@@ -135,7 +138,7 @@ static struct dentry *get_node(int num)
 {
        char s[10];
        struct dentry *root = capifs_root;
-       down(&root->d_inode->i_sem);
+       mutex_lock(&root->d_inode->i_mutex);
        return lookup_one_len(s, root, sprintf(s, "%d", num));
 }
 
@@ -156,7 +159,7 @@ void capifs_new_ncci(unsigned int number, dev_t device)
        dentry = get_node(number);
        if (!IS_ERR(dentry) && !dentry->d_inode)
                d_instantiate(dentry, inode);
-       up(&capifs_root->d_inode->i_sem);
+       mutex_unlock(&capifs_root->d_inode->i_mutex);
 }
 
 void capifs_free_ncci(unsigned int number)
@@ -172,7 +175,7 @@ void capifs_free_ncci(unsigned int number)
                }
                dput(dentry);
        }
-       up(&capifs_root->d_inode->i_sem);
+       mutex_unlock(&capifs_root->d_inode->i_mutex);
 }
 
 static int __init capifs_init(void)