/* Returns a negative error code on failure, zero on success.  */
int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, enum pci_mmap_state mmap_state, int write_combine)
/* Returns a negative error code on failure, zero on success.  */
int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, enum pci_mmap_state mmap_state, int write_combine)
{
	int ret;
	ret = __pci_mmap_make_offset(dev, vma, mmap_state);
	if (ret < 0)
		return ret;
	__pci_mmap_set_pgprot(dev, vma, mmap_state, write_combine);
	ret = io_remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
			         vma->vm_end - vma->vm_start,vma->vm_page_prot);
	return ret;
}