patch-2.4.19 linux-2.4.19/drivers/media/video/vino.c

Next file: linux-2.4.19/drivers/media/video/w9966.c
Previous file: linux-2.4.19/drivers/media/video/videodev.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.18/drivers/media/video/vino.c linux-2.4.19/drivers/media/video/vino.c
@@ -1,6 +1,4 @@
-/* $Id: vino.c,v 1.5 1999/10/09 00:01:14 ralf Exp $
- * drivers/char/vino.c
- *
+/*
  * (incomplete) Driver for the Vino Video input system found in SGI Indys.
  *
  * Copyright (C) 1999 Ulf Carlsson (ulfc@bun.falkenberg.se)
@@ -57,9 +55,7 @@
 		".set\tat\n\t"
 		".set\tmips0"
 		:
-		:"r" (virt_addr),
-		 "r" (&ret)
-		:"$1");
+		:"r" (virt_addr), "r" (&ret));
 	restore_flags(flags);
 
 	return ret;
@@ -83,9 +79,7 @@
 		".set\tat\n\t"
 		".set\tmips0"
 		:
-		:"r" (&value),
-		 "r" (virt_addr)
-		:"$1");
+		:"r" (&value), "r" (virt_addr));
 	restore_flags(flags);
 }
 
@@ -93,45 +87,41 @@
 				    unsigned long addr)
 {
 	unsigned long virt_addr = KSEG1ADDR(addr + VINO_BASE);
-	unsigned long flags;
+	unsigned long tmp, flags;
 
-	save_and_cli(flags);
+	__save_and_cli(flags);
 	__asm__ __volatile__(
-		".set\tmips3\n\t"
+		".set\tmips3\t\t\t# vino_reg_and\n\t"
 		".set\tnoat\n\t"
-		"ld\t$1,(%0)\n\t"
-		"ld\t$2,(%1)\n\t"
-		"and\t$1,$1,$2\n\t"
-		"sd\t$1,(%0)\n\t"
+		"ld\t$1, (%1)\n\t"
+		"ld\t%0, (%2)\n\t"
+		"and\t$1, $1, %0\n\t"
+		"sd\t$1, (%1)\n\t"
 		".set\tat\n\t"
 		".set\tmips0"
-		:
-		:"r" (virt_addr),
-		 "r" (&value)
-		:"$1","$2");
-	restore_flags(flags);
+		: "=&r" (tmp)
+		: "r" (virt_addr), "r" (&value));
+	__restore_flags(flags);
 }
 
 static __inline__ void vino_reg_or(unsigned long long value,
 				   unsigned long addr)
 {
 	unsigned long virt_addr = KSEG1ADDR(addr + VINO_BASE);
-	unsigned long flags;
+	unsigned long tmp, flags;
 
 	save_and_cli(flags);
 	__asm__ __volatile__(
 		".set\tmips3\n\t"
 		".set\tnoat\n\t"
-		"ld\t$1,(%0)\n\t"
-		"ld\t$2,(%1)\n\t"
-		"or\t$1,$1,$2\n\t"
-		"sd\t$1,(%0)\n\t"
+		"ld\t$1, (%1)\n\t"
+		"ld\t%0, (%2)\n\t"
+		"or\t$1, $1, %0\n\t"
+		"sd\t$1, (%1)\n\t"
 		".set\tat\n\t"
 		".set\tmips0"
-		:
-		:"r" (virt_addr),
-		 "r" (&value)
-		:"$1","$2");
+		: "=&r" (tmp)
+		: "r" (virt_addr), "r" (&value));
 	restore_flags(flags);
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)