aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-01-23 17:07:38 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2013-02-22 23:31:31 -0500
commit496ad9aa8ef448058e36ca7a787c61f2e63f0f54 (patch)
tree8f4abde793cd7db5bb8fde6d27ebcacd0e54379a /drivers/infiniband
parent57eccb830f1cc93d4b506ba306d8dfa685e0c88f (diff)
new helper: file_inode(file)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/core/uverbs_cmd.c2
-rw-r--r--drivers/infiniband/hw/ipath/ipath_file_ops.c4
-rw-r--r--drivers/infiniband/hw/ipath/ipath_fs.c6
-rw-r--r--drivers/infiniband/hw/qib/qib_file_ops.c2
-rw-r--r--drivers/infiniband/hw/qib/qib_fs.c4
5 files changed, 9 insertions, 9 deletions
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
index 0cb0007724a2..792e7e9b376f 100644
--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
@@ -730,7 +730,7 @@ ssize_t ib_uverbs_open_xrcd(struct ib_uverbs_file *file,
730 goto err_tree_mutex_unlock; 730 goto err_tree_mutex_unlock;
731 } 731 }
732 732
733 inode = f.file->f_path.dentry->d_inode; 733 inode = file_inode(f.file);
734 xrcd = find_xrcd(file->device, inode); 734 xrcd = find_xrcd(file->device, inode);
735 if (!xrcd && !(cmd.oflags & O_CREAT)) { 735 if (!xrcd && !(cmd.oflags & O_CREAT)) {
736 /* no file descriptor. Need CREATE flag */ 736 /* no file descriptor. Need CREATE flag */
diff --git a/drivers/infiniband/hw/ipath/ipath_file_ops.c b/drivers/infiniband/hw/ipath/ipath_file_ops.c
index 3eb7e454849b..aed8afee56da 100644
--- a/drivers/infiniband/hw/ipath/ipath_file_ops.c
+++ b/drivers/infiniband/hw/ipath/ipath_file_ops.c
@@ -1864,9 +1864,9 @@ static int ipath_assign_port(struct file *fp,
1864 goto done_chk_sdma; 1864 goto done_chk_sdma;
1865 } 1865 }
1866 1866
1867 i_minor = iminor(fp->f_path.dentry->d_inode) - IPATH_USER_MINOR_BASE; 1867 i_minor = iminor(file_inode(fp)) - IPATH_USER_MINOR_BASE;
1868 ipath_cdbg(VERBOSE, "open on dev %lx (minor %d)\n", 1868 ipath_cdbg(VERBOSE, "open on dev %lx (minor %d)\n",
1869 (long)fp->f_path.dentry->d_inode->i_rdev, i_minor); 1869 (long)file_inode(fp)->i_rdev, i_minor);
1870 1870
1871 if (i_minor) 1871 if (i_minor)
1872 ret = find_free_port(i_minor - 1, fp, uinfo); 1872 ret = find_free_port(i_minor - 1, fp, uinfo);
diff --git a/drivers/infiniband/hw/ipath/ipath_fs.c b/drivers/infiniband/hw/ipath/ipath_fs.c
index a4de9d58e9b4..a479375a8fd8 100644
--- a/drivers/infiniband/hw/ipath/ipath_fs.c
+++ b/drivers/infiniband/hw/ipath/ipath_fs.c
@@ -113,7 +113,7 @@ static ssize_t atomic_counters_read(struct file *file, char __user *buf,
113 struct infinipath_counters counters; 113 struct infinipath_counters counters;
114 struct ipath_devdata *dd; 114 struct ipath_devdata *dd;
115 115
116 dd = file->f_path.dentry->d_inode->i_private; 116 dd = file_inode(file)->i_private;
117 dd->ipath_f_read_counters(dd, &counters); 117 dd->ipath_f_read_counters(dd, &counters);
118 118
119 return simple_read_from_buffer(buf, count, ppos, &counters, 119 return simple_read_from_buffer(buf, count, ppos, &counters,
@@ -154,7 +154,7 @@ static ssize_t flash_read(struct file *file, char __user *buf,
154 goto bail; 154 goto bail;
155 } 155 }
156 156
157 dd = file->f_path.dentry->d_inode->i_private; 157 dd = file_inode(file)->i_private;
158 if (ipath_eeprom_read(dd, pos, tmp, count)) { 158 if (ipath_eeprom_read(dd, pos, tmp, count)) {
159 ipath_dev_err(dd, "failed to read from flash\n"); 159 ipath_dev_err(dd, "failed to read from flash\n");
160 ret = -ENXIO; 160 ret = -ENXIO;
@@ -207,7 +207,7 @@ static ssize_t flash_write(struct file *file, const char __user *buf,
207 goto bail_tmp; 207 goto bail_tmp;
208 } 208 }
209 209
210 dd = file->f_path.dentry->d_inode->i_private; 210 dd = file_inode(file)->i_private;
211 if (ipath_eeprom_write(dd, pos, tmp, count)) { 211 if (ipath_eeprom_write(dd, pos, tmp, count)) {
212 ret = -ENXIO; 212 ret = -ENXIO;
213 ipath_dev_err(dd, "failed to write to flash\n"); 213 ipath_dev_err(dd, "failed to write to flash\n");
diff --git a/drivers/infiniband/hw/qib/qib_file_ops.c b/drivers/infiniband/hw/qib/qib_file_ops.c
index 959a5c4ff812..4f7aa301b3b1 100644
--- a/drivers/infiniband/hw/qib/qib_file_ops.c
+++ b/drivers/infiniband/hw/qib/qib_file_ops.c
@@ -1524,7 +1524,7 @@ static int qib_assign_ctxt(struct file *fp, const struct qib_user_info *uinfo)
1524 } 1524 }
1525 } 1525 }
1526 1526
1527 i_minor = iminor(fp->f_dentry->d_inode) - QIB_USER_MINOR_BASE; 1527 i_minor = iminor(file_inode(fp)) - QIB_USER_MINOR_BASE;
1528 if (i_minor) 1528 if (i_minor)
1529 ret = find_free_ctxt(i_minor - 1, fp, uinfo); 1529 ret = find_free_ctxt(i_minor - 1, fp, uinfo);
1530 else 1530 else
diff --git a/drivers/infiniband/hw/qib/qib_fs.c b/drivers/infiniband/hw/qib/qib_fs.c
index 65a2a23f6f8a..644bd6f6467c 100644
--- a/drivers/infiniband/hw/qib/qib_fs.c
+++ b/drivers/infiniband/hw/qib/qib_fs.c
@@ -45,7 +45,7 @@
45 45
46static struct super_block *qib_super; 46static struct super_block *qib_super;
47 47
48#define private2dd(file) ((file)->f_dentry->d_inode->i_private) 48#define private2dd(file) (file_inode(file)->i_private)
49 49
50static int qibfs_mknod(struct inode *dir, struct dentry *dentry, 50static int qibfs_mknod(struct inode *dir, struct dentry *dentry,
51 umode_t mode, const struct file_operations *fops, 51 umode_t mode, const struct file_operations *fops,
@@ -171,7 +171,7 @@ static const struct file_operations cntr_ops[] = {
171}; 171};
172 172
173/* 173/*
174 * Could use file->f_dentry->d_inode->i_ino to figure out which file, 174 * Could use file_inode(file)->i_ino to figure out which file,
175 * instead of separate routine for each, but for now, this works... 175 * instead of separate routine for each, but for now, this works...
176 */ 176 */
177 177