From 688d6d304655476d3a1f93241e612164a420ba21 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Thu, 18 Mar 2004 15:01:55 -0800 Subject: [PATCH] [PATCH] sound: use kernel min/max From: "Randy.Dunlap" From: Michael Veeck Remove unnecessary min/max macros and changes calls to use kernel.h macros instead. --- sound/oss/nm256_audio.c | 11 ++++------- sound/oss/soundcard.c | 4 ---- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/sound/oss/nm256_audio.c b/sound/oss/nm256_audio.c index bdb8c06528e8c..777492c35dc47 100644 --- a/sound/oss/nm256_audio.c +++ b/sound/oss/nm256_audio.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -450,9 +451,6 @@ nm256_get_new_block (struct nm256_info *card) } } -/* 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 *card) /* 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 *card) } 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 *card) DMAbuf_inputintr (card->dev_for_record); } } -#undef MIN -/* +/* * Initialize the hardware. */ static void diff --git a/sound/oss/soundcard.c b/sound/oss/soundcard.c index a1170a7487c0c..ddc9e4448c33d 100644 --- a/sound/oss/soundcard.c +++ b/sound/oss/soundcard.c @@ -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) -- 2.53.0