/* XXX VME bridges could be available on buses other than PCI. At the momment this framework only supports PCI devices.  */
void* vme_alloc_consistent(struct vme_resource *resource, size_t size, dma_addr_t *dma)
/* XXX VME bridges could be available on buses other than PCI. At the momment this framework only supports PCI devices.  */
void* vme_alloc_consistent(struct vme_resource *resource, size_t size, dma_addr_t *dma)
{
	struct vme_bridge *bridge;
	struct pci_dev *pdev;
	if(resource == NULL) {
		printk("No resource\n");
		return NULL;
	}
	bridge = find_bridge(resource);
	if(bridge == NULL) {
		printk("Can't find bridge\n");
		return NULL;
	}
	if (bridge->parent == NULL) {
		printk("Dev entry NULL\n");
		return NULL;
	}
	pdev = container_of(bridge->parent, struct pci_dev, dev);
	return pci_alloc_consistent(pdev, size, dma);
}