new helper: file_inode(file)
[linux-2.6-block.git] / drivers / infiniband / hw / ipath / ipath_fs.c
index a4de9d58e9b4749edda15575ed4c8a4e254678c1..a479375a8fd8067ad5cabd21974f441f996f90d6 100644 (file)
@@ -113,7 +113,7 @@ static ssize_t atomic_counters_read(struct file *file, char __user *buf,
        struct infinipath_counters counters;
        struct ipath_devdata *dd;
 
-       dd = file->f_path.dentry->d_inode->i_private;
+       dd = file_inode(file)->i_private;
        dd->ipath_f_read_counters(dd, &counters);
 
        return simple_read_from_buffer(buf, count, ppos, &counters,
@@ -154,7 +154,7 @@ static ssize_t flash_read(struct file *file, char __user *buf,
                goto bail;
        }
 
-       dd = file->f_path.dentry->d_inode->i_private;
+       dd = file_inode(file)->i_private;
        if (ipath_eeprom_read(dd, pos, tmp, count)) {
                ipath_dev_err(dd, "failed to read from flash\n");
                ret = -ENXIO;
@@ -207,7 +207,7 @@ static ssize_t flash_write(struct file *file, const char __user *buf,
                goto bail_tmp;
        }
 
-       dd = file->f_path.dentry->d_inode->i_private;
+       dd = file_inode(file)->i_private;
        if (ipath_eeprom_write(dd, pos, tmp, count)) {
                ret = -ENXIO;
                ipath_dev_err(dd, "failed to write to flash\n");