summaryrefslogtreecommitdiffstats
path: root/drivers/sbus/char/bwtwo.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/bwtwo.c
parent30c6397ce63178fcb3e7963ac247f0a03132aca9 (diff)
Sync with Linux 2.1.46.
Diffstat (limited to 'drivers/sbus/char/bwtwo.c')
-rw-r--r--drivers/sbus/char/bwtwo.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/sbus/char/bwtwo.c b/drivers/sbus/char/bwtwo.c
index ae81e1260..615fef33d 100644
--- a/drivers/sbus/char/bwtwo.c
+++ b/drivers/sbus/char/bwtwo.c
@@ -1,4 +1,4 @@
-/* $Id: bwtwo.c,v 1.16 1997/06/04 08:27:26 davem Exp $
+/* $Id: bwtwo.c,v 1.18 1997/07/17 02:21:43 davem Exp $
* bwtwo.c: bwtwo console driver
*
* Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx)
@@ -74,7 +74,8 @@ static int
bwtwo_mmap (struct inode *inode, struct file *file, struct vm_area_struct *vma,
long base, fbinfo_t *fb)
{
- uint size, map_offset, r;
+ uint size, r;
+ unsigned long map_offset;
int map_size;
map_size = size = vma->vm_end - vma->vm_start;
@@ -91,9 +92,10 @@ bwtwo_mmap (struct inode *inode, struct file *file, struct vm_area_struct *vma,
map_offset = get_phys ((unsigned long) fb->base);
r = io_remap_page_range (vma->vm_start, map_offset, map_size,
vma->vm_page_prot, fb->space);
- if (r) return -EAGAIN;
- vma->vm_inode = inode;
- atomic_inc(&inode->i_count);
+ if (r)
+ return -EAGAIN;
+
+ vma->vm_dentry = dget(file->f_dentry);
return 0;
}