如何移植这一个代码

extern DAS_IOT_CARD_DESP iniCardDesp;
static PCI_DEVEXT DevExtension[32]; // instance for every device_open
static PCI_DRVEXT drv_ext;
static int device_number = 0; // return by AdlFindDevice(…) in init_module
static int MAJOR = 0;
typedef struct
pci_device_extension
{
PPCI_DRVEXT pDrvExt;
PPCI_DBX pDbx[DAS_FUNC_COUNT];
PDAQ2K_CAL pDaq2KCal;
PPCI_DSEN pTcn;
PPCI_DSEN pDin;

U8 wBus;
U8 wFunc;
U8 wSlot;
U8 Irq_no;
U32 dwDevRA;
U32 dwDevRB;
U32 dwPortMapAddr[PCI_PORT_MAX];

U16 wPciController;
U16 wCard;
U8 wRevId;
U16 wPortCnt;
BOOLEAN fDeviceOpen;
U32 dwDIOCtrl;
U16 wAdConfig;
U16 wAdTrig;
U16 wATrigCtrl;
U16 wDaConfig;
U16 wDaTrig;
U16 wGPTCCtrl[2];
U8 bGPTCPol[2];
U8 bRevId;
U16 Reference;

/* 01/11/20 Jeffrey, added the length for IO region /
U32 dwPortMapLen[PCI_PORT_MAX];
/
01/11/20 Jeffrey, added for the single off-borad memory for IOP-480 */
I16 MemPortIndex;
PCI_ADD CalShareMem;
U32 dwMemMapAddr;
struct timer_list adl_timer; // for IoStartTimer
BOOLEAN openable;

#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,0)
wait_queue_head_t ai_sync_wq;
wait_queue_head_t ao_sync_wq;
wait_queue_head_t di_sync_wq;
wait_queue_head_t do_sync_wq;
#elif LINUX_VERSION_CODE > KERNEL_VERSION(2,2,0)
struct wait_queue *ai_sync_wq;
struct wait_queue *ao_sync_wq;
struct wait_queue *di_sync_wq;
struct wait_queue *do_sync_wq;
#endif

// jeffrey added 07/08/02, for AO Re-Trigger
BOOLEAN bAO_RepeatDone;
BOOLEAN bAO_RepeatDone2; //for DAQ250x only
}
PCI_DEVEXT,
*PPCI_DEVEXT;



#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,0)
// replace the code segment for WAIT_QUEUE_HEAD_INITIALIZER
init_waitqueue_head( &(DevExtension
.ai_sync_wq) );
init_waitqueue_head( &(DevExtension.ao_sync_wq) );
init_waitqueue_head( &(DevExtension.di_sync_wq) );
init_waitqueue_head( &(DevExtension.do_sync_wq) );
#endif