patch-2.1.129 linux/include/asm-sparc64/dma.h

Next file: linux/include/asm-sparc64/namei.h
Previous file: linux/include/asm-sparc64/audioio.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.128/linux/include/asm-sparc64/dma.h linux/include/asm-sparc64/dma.h
@@ -1,4 +1,4 @@
-/* $Id: dma.h,v 1.9 1998/10/26 20:03:15 davem Exp $
+/* $Id: dma.h,v 1.10 1998/10/27 23:28:50 davem Exp $
  * include/asm-sparc64/dma.h
  *
  * Copyright 1996 (C) David S. Miller (davem@caip.rutgers.edu)
@@ -17,17 +17,14 @@
 
 extern spinlock_t  dma_spin_lock;
 
-static __inline__ unsigned long claim_dma_lock(void)
-{
-	unsigned long flags;
-	spin_lock_irqsave(&dma_spin_lock, flags);
-	return flags;
-}
-
-static __inline__ void release_dma_lock(unsigned long flags)
-{
-	spin_unlock_irqrestore(&dma_spin_lock, flags);
-}
+#define claim_dma_lock() \
+({	unsigned long flags; \
+	spin_lock_irqsave(&dma_spin_lock, flags); \
+	flags; \
+})
+
+#define release_dma_lock(__flags) \
+	spin_unlock_irqrestore(&dma_spin_lock, __flags);
 
 /* These are irrelevant for Sparc DMA, but we leave it in so that
  * things can compile.

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