#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>
}
}
-/* 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
/* 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,
}
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);
DMAbuf_inputintr (card->dev_for_record);
}
}
-#undef MIN
-/*
+/*
* Initialize the hardware.
*/
static void