unsigned short pci_bus,
unsigned short pci_slot);
-int i_pci_card_free(struct pcilst_struct *amcc);
-
/****************************************************************************/
/* build list of amcc cards in this system */
return 1;
}
-/****************************************************************************/
-/* mark card as free */
-int i_pci_card_free(struct pcilst_struct *amcc)
-{
- if (!amcc)
- return -1;
-
- if (!amcc->used)
- return 1;
- amcc->used = 0;
- comedi_pci_disable(amcc->pcidev);
- return 0;
-}
-
/****************************************************************************/
/* select and alloc card */
struct pcilst_struct *ptr_select_and_alloc_pci_card(unsigned short vendor_id,
free_irq(dev->irq, dev);
if ((this_board->pc_EepromChip == NULL) ||
(strcmp(this_board->pc_EepromChip, ADDIDATA_9054) != 0)) {
- if (devpriv->allocated)
- i_pci_card_free(devpriv->amcc);
+ if (devpriv->allocated) {
+ comedi_pci_disable(devpriv->amcc->pcidev);
+ devpriv->amcc->used = 0;
+ }
if (devpriv->ul_DmaBufferVirtual[0]) {
free_pages((unsigned long)devpriv->
ul_DmaBufferVirtual[0],
}
} else {
iounmap(devpriv->dw_AiBase);
- if (devpriv->allocated)
- i_pci_card_free(devpriv->amcc);
+ if (devpriv->allocated) {
+ comedi_pci_disable(devpriv->amcc->pcidev);
+ devpriv->amcc->used = 0;
+ }
}
if (pci_list_builded) {
v_pci_card_list_cleanup(this_board->i_VendorId);