summaryrefslogtreecommitdiffstats
path: root/drivers/sbus/char/vfc_dev.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-07-20 14:56:40 +0000
committerRalf Baechle <ralf@linux-mips.org>1997-07-20 14:56:40 +0000
commite308faf24f68e262d92d294a01ddca7a17e76762 (patch)
tree22c47cb315811834861f013067878ff664e95abd /drivers/sbus/char/vfc_dev.c
parent30c6397ce63178fcb3e7963ac247f0a03132aca9 (diff)
Sync with Linux 2.1.46.
Diffstat (limited to 'drivers/sbus/char/vfc_dev.c')
-rw-r--r--drivers/sbus/char/vfc_dev.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/sbus/char/vfc_dev.c b/drivers/sbus/char/vfc_dev.c
index 00cdfe35c..007174a82 100644
--- a/drivers/sbus/char/vfc_dev.c
+++ b/drivers/sbus/char/vfc_dev.c
@@ -577,11 +577,12 @@ static int vfc_mmap(struct inode *inode, struct file *file,
if(vma->vm_offset & ~PAGE_MASK) return -ENXIO;
vma->vm_flags |= VM_SHM | VM_LOCKED | VM_IO | VM_MAYREAD | VM_MAYWRITE | VM_MAYSHARE;
map_offset=(unsigned int)dev->phys_regs;
- ret=io_remap_page_range(vma->vm_start,map_offset,map_size,
- vma->vm_page_prot, dev->which_io);
- if(ret) return -EAGAIN;
- vma->vm_inode=inode;
- atomic_inc(&inode->i_count);
+ ret = io_remap_page_range(vma->vm_start,map_offset,map_size,
+ vma->vm_page_prot, dev->which_io);
+ if(ret)
+ return -EAGAIN;
+
+ vma->vm_dentry = dget(file->f_dentry);
return 0;
}