From: "Randy.Dunlap" <rddunlap@osdl.org>

From: Michael Veeck <michael.veeck@gmx.net>

Remove unnecessary min/max macros and changes calls to use kernel.h macros
instead.


---

 25-akpm/sound/oss/nm256_audio.c |   11 ++++-------
 25-akpm/sound/oss/soundcard.c   |    4 ----
 2 files changed, 4 insertions(+), 11 deletions(-)

diff -puN sound/oss/nm256_audio.c~sound_oss_minmax sound/oss/nm256_audio.c
--- 25/sound/oss/nm256_audio.c~sound_oss_minmax	2004-03-16 18:48:57.967906120 -0800
+++ 25-akpm/sound/oss/nm256_audio.c	2004-03-16 18:48:57.972905360 -0800
@@ -22,6 +22,7 @@
 #include <linux/pci.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/pm.h>
 #include <linux/delay.h>
@@ -450,9 +451,6 @@ nm256_get_new_block (struct nm256_info *
     }
 }
 
-/* Ultra cheez-whiz.  But I'm too lazy to grep headers. */
-#define MIN(X,Y) ((X) < (Y) ? (X) : (Y))
-
 /* 
  * Read the last-recorded block from the ring buffer, copy it into the
  * saved buffer pointer, and invoke DMAuf_inputintr() with the recording
@@ -480,7 +478,7 @@ nm256_read_block (struct nm256_info *car
 	/* If we wrapped around, copy everything from the start of our
 	   recording buffer to the end of the buffer. */
 	if (currptr < card->curRecPos) {
-	    u32 amt = MIN (ringsize - card->curRecPos, amtToRead);
+	    u32 amt = min (ringsize - card->curRecPos, amtToRead);
 
 	    nm256_readBuffer8 (card, card->recBuf, 1,
 				 card->abuf2 + card->curRecPos,
@@ -493,7 +491,7 @@ nm256_read_block (struct nm256_info *car
 	}
 
 	if ((card->curRecPos < currptr) && (amtToRead > 0)) {
-	    u32 amt = MIN (currptr - card->curRecPos, amtToRead);
+	    u32 amt = min (currptr - card->curRecPos, amtToRead);
 	    nm256_readBuffer8 (card, card->recBuf, 1,
 				 card->abuf2 + card->curRecPos, amt);
 	    card->curRecPos = ((card->curRecPos + amt) % ringsize);
@@ -503,9 +501,8 @@ nm256_read_block (struct nm256_info *car
 	DMAbuf_inputintr (card->dev_for_record);
     }
 }
-#undef MIN
 
-/* 
+/*
  * Initialize the hardware. 
  */
 static void
diff -puN sound/oss/soundcard.c~sound_oss_minmax sound/oss/soundcard.c
--- 25/sound/oss/soundcard.c~sound_oss_minmax	2004-03-16 18:48:57.969905816 -0800
+++ 25-akpm/sound/oss/soundcard.c	2004-03-16 18:48:57.973905208 -0800
@@ -136,10 +136,6 @@ static int get_mixer_levels(caddr_t arg)
 	return 0;
 }
 
-#ifndef MIN
-#define MIN(a,b) (((a) < (b)) ? (a) : (b))
-#endif
-
 /* 4K page size but our output routines use some slack for overruns */
 #define PROC_BLOCK_SIZE (3*1024)
 

_