patch-2.1.97 linux/drivers/sbus/char/bwtwo.c

Next file: linux/drivers/sbus/char/cgfourteen.c
Previous file: linux/drivers/sbus/char/Makefile
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.96/linux/drivers/sbus/char/bwtwo.c linux/drivers/sbus/char/bwtwo.c
@@ -1,8 +1,9 @@
-/* $Id: bwtwo.c,v 1.18 1997/07/17 02:21:43 davem Exp $
+/* $Id: bwtwo.c,v 1.20 1998/03/10 20:18:22 jj Exp $
  * bwtwo.c: bwtwo console driver
  *
  * Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx)
  * Copyright (C) 1997 Eddie C. Dost   (ecd@skynet.be)
+ * Copyright (C) 1998 Pavel Machek    (pavel@ucw.cz)
  */
 
 #include <linux/kd.h>
@@ -95,7 +96,8 @@
 	if (r)
 		return -EAGAIN;
 
-	vma->vm_dentry = dget(file->f_dentry);
+	vma->vm_file = file;
+	file->f_count++;
 	return 0;
 }
 
@@ -156,15 +158,17 @@
 	fb->loadcmap = 0;
 	fb->ioctl = 0;
 	fb->reset = 0;
+#ifndef CONFIG_SUN4	
 	fb->blank = bwtwo_blank;
 	fb->unblank = bwtwo_unblank;
+#endif
 
 	fb->info.bwtwo.regs =
 		sparc_alloc_io (bwtwo + BWTWO_REGISTER_OFFSET,
 				0, sizeof (struct bwtwo_regs),
 		"bwtwo_regs", bw2_io, 0);
 
-	if (!prom_getbool(sbdp->prom_node, "width")) {
+	if (sbdp && !prom_getbool(sbdp->prom_node, "width")) {
 		/* Ugh, broken PROM didn't initialize us.
 		 * Let's deal with this ourselves.
 		 */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov