mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
new helper: file_inode(file)
Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
57eccb830f
commit
496ad9aa8e
306 changed files with 696 additions and 717 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue