]> git.ipfire.org Git - people/ms/linux.git/blobdiff - drivers/platform/x86/toshiba_acpi.c
new helper: file_inode(file)
[people/ms/linux.git] / drivers / platform / x86 / toshiba_acpi.c
index c2727895794ca51d7623bc820c6aeadd422fa4c5..6fba80ad3bcae7df7e359c5f648cd3c595a38c66 100644 (file)
@@ -583,7 +583,7 @@ static int set_lcd_status(struct backlight_device *bd)
 static ssize_t lcd_proc_write(struct file *file, const char __user *buf,
                              size_t count, loff_t *pos)
 {
-       struct toshiba_acpi_dev *dev = PDE(file->f_path.dentry->d_inode)->data;
+       struct toshiba_acpi_dev *dev = PDE(file_inode(file))->data;
        char cmd[42];
        size_t len;
        int value;
@@ -650,7 +650,7 @@ static int video_proc_open(struct inode *inode, struct file *file)
 static ssize_t video_proc_write(struct file *file, const char __user *buf,
                                size_t count, loff_t *pos)
 {
-       struct toshiba_acpi_dev *dev = PDE(file->f_path.dentry->d_inode)->data;
+       struct toshiba_acpi_dev *dev = PDE(file_inode(file))->data;
        char *cmd, *buffer;
        int ret;
        int value;
@@ -750,7 +750,7 @@ static int fan_proc_open(struct inode *inode, struct file *file)
 static ssize_t fan_proc_write(struct file *file, const char __user *buf,
                              size_t count, loff_t *pos)
 {
-       struct toshiba_acpi_dev *dev = PDE(file->f_path.dentry->d_inode)->data;
+       struct toshiba_acpi_dev *dev = PDE(file_inode(file))->data;
        char cmd[42];
        size_t len;
        int value;
@@ -822,7 +822,7 @@ static int keys_proc_open(struct inode *inode, struct file *file)
 static ssize_t keys_proc_write(struct file *file, const char __user *buf,
                               size_t count, loff_t *pos)
 {
-       struct toshiba_acpi_dev *dev = PDE(file->f_path.dentry->d_inode)->data;
+       struct toshiba_acpi_dev *dev = PDE(file_inode(file))->data;
        char cmd[42];
        size_t len;
        int value;