/* Unmap the BAR regions that had been mapped earlier using map_bars()  */
static void unmap_bars(struct ape_dev *ape, struct pci_dev *dev)
/* Unmap the BAR regions that had been mapped earlier using map_bars()  */
static void unmap_bars(struct ape_dev *ape, struct pci_dev *dev)
{
	int i;
	for (i = 0; i < APE_BAR_NUM; i++) {
		if (ape->bar[i]) {
			pci_iounmap(dev, ape->bar[i]);
			ape->bar[i] = NULL;
		}
	}
}