/* dma_region_sync_for_device - sync the IO bus' view of the buffer  */
void dma_region_sync_for_device(struct dma_region *dma, unsigned long offset, unsigned long len)
/* dma_region_sync_for_device - sync the IO bus' view of the buffer  */
void dma_region_sync_for_device(struct dma_region *dma, unsigned long offset, unsigned long len)
{
	int first, last;
	unsigned long rem = 0;
	if (!len)
		len = 1;
	first = dma_region_find(dma, offset, 0, &rem);
	last = dma_region_find(dma, rem + len - 1, first, &rem);
	pci_dma_sync_sg_for_device(dma->dev, &dma->sglist[first],
				   last - first + 1, dma->direction);
}