rem: EMU10kxBase->flush_caches = pci_bus() & ( GrexA1200Bus | GrexA4000Bus );
context: DriverInit( struct DriverBase* ahisubbase ){  struct EMU10kxBase* EMU10kxBase = (struct EMU10kxBase*) ahisubbase;  struct pci_dev*     dev;  int                 card_no;  /*** Libraries etc. ********************************************************/  AHIsubBase = ahisubbase;    DOSBase  = (struct DosLibrary*) OpenLibrary( DOSNAME, 37 );  OpenPciBase = OpenLibrary( "openpci.library", 1 );  if( DOSBase == NULL )  {    Req( "Unable to open 'dos.library' version 37.\n" );    return FALSE;  }  if( OpenPciBase == NULL )  {    Req( "Unable to open 'openpci.library' version 1.\n" );    return FALSE;  }  InitSemaphore( &EMU10kxBase->semaphore );  EMU10kxBase->flush_caches = pci_bus() & ( GrexA1200Bus | GrexA4000Bus );  /*** Count cards ***********************************************************/  EMU10kxBase->cards_found = 0;  dev = NULL;  // Search for Live! cards  while( ( dev = pci_find_device( PCI_VENDOR_ID_CREATIVE,				  PCI_DEVICE_ID_CREATIVE_EMU10K1,				  dev ) ) != NULL )  {    ++EMU10kxBase->cards_found;  }  // Search for Audigy cards  while( ( dev = pci_find_device( PCI_VENDOR_ID_CREATIVE,				  PCI_DEVICE_ID_CREATIVE_AUDIGY,				  dev ) ) != NULL )  {    ++EMU10kxBase->cards_found;  }    // Fail if no hardware (prevents the audio modes form being added to  // the database if the driver cannot be used).  if( EMU10kxBase->cards_found == 0 )  {//    Req( "No SoundBlaster Live! or Audigy card present.\n" );    KPrintF( DRIVER ":No SoundBlaster Live! or Audigy card present.\n" );    return FALSE;  }  /*** CAMD ******************************************************************/    InitSemaphore( &EMU10kxBase->camd.Semaphore );  EMU10kxBase->camd.Semaphore.ss_Link.ln_Pri  = 0;  EMU10kxBase->camd.Semaphore.ss_Link.ln_Name = EMU10KX_CAMD_SEMAPHORE;    EMU10kxBase->camd.Cards    = EMU10kxBase->cards_found;  EMU10kxBase->camd.Version  = VERSION;  EMU10kxBase->camd.Revision = REVISION;  EMU10kxBase->camd.OpenPortFunc.h_Entry    = HookEntry;  EMU10kxBase->camd.OpenPortFunc.h_SubEntry = OpenCAMDPort;  EMU10kxBase->camd.OpenPortFunc.h_Data     = NULL;  EMU10kxBase->camd.ClosePortFunc.h_Entry    = HookEntry;  EMU10kxBase->camd.ClosePortFunc.h_SubEntry = (HOOKFUNC) CloseCAMDPort;  EMU10kxBase->camd.ClosePortFunc.h_Data     = NULL;  EMU10kxBase->camd.ActivateXmitFunc.h_Entry    = HookEntry;  EMU10kxBase->camd.ActivateXmitFunc.h_SubEntry = (HOOKFUNC) ActivateCAMDXmit;  EMU10kxBase->camd.ActivateXmitFunc.h_Data     = NULL;  AddSemaphore( &EMU10kxBase->camd.Semaphore );    /*** AC97 Mixer ************************************************************/    InitSemaphore( &EMU10kxBase->ac97.Semaphore );  EMU10kxBase->ac97.Semaphore.ss_Link.ln_Pri  = 0;  EMU10kxBase->ac97.Semaphore.ss_Link.ln_Name = EMU10KX_AC97_SEMAPHORE;    EMU10kxBase->ac97.Cards    = EMU10kxBase->cards_found;  EMU10kxBase->ac97.Version  = VERSION;  EMU10kxBase->ac97.Revision = REVISION;  EMU10kxBase->ac97.GetFunc.h_Entry    = HookEntry;  EMU10kxBase->ac97.GetFunc.h_SubEntry = AC97GetFunc;  EMU10kxBase->ac97.GetFunc.h_Data     = NULL;  EMU10kxBase->ac97.SetFunc.h_Entry    = HookEntry;  EMU10kxBase->ac97.SetFunc.h_SubEntry = (HOOKFUNC) AC97SetFunc;  EMU10kxBase->ac97.SetFunc.h_Data     = NULL;  AddSemaphore( &EMU10kxBase->ac97.Semaphore );    /*** Allocate and init all cards *******************************************/  EMU10kxBase->driverdatas = AllocVec( sizeof( *EMU10kxBase->driverdatas ) *				       EMU10kxBase->cards_found,				       MEMF_PUBLIC );    if( EMU10kxBase->driverdatas == NULL )  {    Req( "Out of memory." );    return FALSE;  }  card_no = 0;  // Live! cards ...   while( ( dev = pci_find_device( PCI_VENDOR_ID_CREATIVE,				  PCI_DEVICE_ID_CREATIVE_EMU10K1,				  dev ) ) != NULL )  {    EMU10kxBase->driverdatas[ card_no ] = AllocDriverData( dev, AHIsubBase );    ++card_no;  }  // Audigy cards ...  while( ( dev = pci_find_device( PCI_VENDOR_ID_CREATIVE,				  PCI_DEVICE_ID_CREATIVE_AUDIGY,				  dev ) ) != NULL )  {    EMU10kxBase->driverdatas[ card_no ] = AllocDriverData( dev, AHIsubBase );    ++card_no;  }  return TRUE;}