#include <linux/ioport.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
-#include <linux/module.h>
#include <linux/major.h>
#include <linux/blkdev.h>
#include <linux/stat.h>
int i;
/* setup sync data */
- for ( i = 0; i < NUMBER(data->Sync); i++ ) {
+ for ( i = 0; i < ARRAY_SIZE(data->Sync); i++ ) {
data->Sync[i] = tmp_sync;
}
}
unsigned int base = SCpnt->device->host->io_port;
nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata;
char *buf = data->MsgBuffer;
- int len = MIN(MSGBUF_SIZE, data->MsgLen);
+ int len = min(MSGBUF_SIZE, data->MsgLen);
int ptr;
int ret;
continue;
}
- res = MIN(res, SCpnt->SCp.this_residual);
+ res = min(res, SCpnt->SCp.this_residual);
switch (data->TransferMode) {
case MODE_IO32:
continue;
}
- res = MIN(SCpnt->SCp.this_residual, WFIFO_CRIT);
+ res = min(SCpnt->SCp.this_residual, WFIFO_CRIT);
//nsp_dbg(NSP_DEBUG_DATA_IO, "ptr=0x%p this=0x%x res=0x%x", SCpnt->SCp.ptr, SCpnt->SCp.this_residual, res);
switch (data->TransferMode) {
spin_unlock_irqrestore(&(data->Lock), flags);
SPRINTF("SDTR status\n");
- for(id = 0; id < NUMBER(data->Sync); id++) {
+ for(id = 0; id < ARRAY_SIZE(data->Sync); id++) {
SPRINTF("id %d: ", id);
}
- thislength = MIN(thislength, length);
+ thislength = min(thislength, length);
*start = buffer + offset;
return thislength;