]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/pci/proc.c
Merge tag 'at91-fixes' of git://github.com/at91linux/linux-at91 into fixes
[karo-tx-linux.git] / drivers / pci / proc.c
index 9b8505ccc56d5ef87a09105f5847d19a441ec704..0b009470e6db548005b6f66539b18e372e8f2261 100644 (file)
@@ -21,7 +21,7 @@ static loff_t
 proc_bus_pci_lseek(struct file *file, loff_t off, int whence)
 {
        loff_t new = -1;
-       struct inode *inode = file->f_path.dentry->d_inode;
+       struct inode *inode = file_inode(file);
 
        mutex_lock(&inode->i_mutex);
        switch (whence) {
@@ -46,7 +46,7 @@ proc_bus_pci_lseek(struct file *file, loff_t off, int whence)
 static ssize_t
 proc_bus_pci_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos)
 {
-       const struct inode *ino = file->f_path.dentry->d_inode;
+       const struct inode *ino = file_inode(file);
        const struct proc_dir_entry *dp = PDE(ino);
        struct pci_dev *dev = dp->data;
        unsigned int pos = *ppos;
@@ -132,7 +132,7 @@ proc_bus_pci_read(struct file *file, char __user *buf, size_t nbytes, loff_t *pp
 static ssize_t
 proc_bus_pci_write(struct file *file, const char __user *buf, size_t nbytes, loff_t *ppos)
 {
-       struct inode *ino = file->f_path.dentry->d_inode;
+       struct inode *ino = file_inode(file);
        const struct proc_dir_entry *dp = PDE(ino);
        struct pci_dev *dev = dp->data;
        int pos = *ppos;
@@ -212,7 +212,7 @@ struct pci_filp_private {
 static long proc_bus_pci_ioctl(struct file *file, unsigned int cmd,
                               unsigned long arg)
 {
-       const struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode);
+       const struct proc_dir_entry *dp = PDE(file_inode(file));
        struct pci_dev *dev = dp->data;
 #ifdef HAVE_PCI_MMAP
        struct pci_filp_private *fpriv = file->private_data;
@@ -253,7 +253,7 @@ static long proc_bus_pci_ioctl(struct file *file, unsigned int cmd,
 #ifdef HAVE_PCI_MMAP
 static int proc_bus_pci_mmap(struct file *file, struct vm_area_struct *vma)
 {
-       struct inode *inode = file->f_path.dentry->d_inode;
+       struct inode *inode = file_inode(file);
        const struct proc_dir_entry *dp = PDE(inode);
        struct pci_dev *dev = dp->data;
        struct pci_filp_private *fpriv = file->private_data;