X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Foss%2Fcmpci.c;h=16ff7f094c20029e143998089c8e2a9dfbc8c32c;hb=352771d8dfacc828fdee58d5def490d5fb480c83;hp=a862958ac4d2ad6c42b54d6b7c5b2368eac8aef8;hpb=8acd6bd4f7d04a05c364bea1883ca3876efde353;p=linux-2.6.git diff --git a/sound/oss/cmpci.c b/sound/oss/cmpci.c index a862958ac..16ff7f094 100644 --- a/sound/oss/cmpci.c +++ b/sound/oss/cmpci.c @@ -1393,7 +1393,7 @@ static int prog_dmabuf(struct cm_state *s, unsigned rec) if (!db->rawbuf || !db->dmaaddr) return -ENOMEM; db->buforder = order; - /* now mark the pages as reserved; otherwise remap_page_range doesn't do what we want */ + /* now mark the pages as reserved; otherwise remap_pfn_range doesn't do what we want */ pend = virt_to_page(db->rawbuf + (PAGE_SIZE << db->buforder) - 1); for (pstart = virt_to_page(db->rawbuf); pstart <= pend; pstart++) SetPageReserved(pstart); @@ -2301,7 +2301,9 @@ static int cm_mmap(struct file *file, struct vm_area_struct *vma) if (size > (PAGE_SIZE << db->buforder)) goto out; ret = -EINVAL; - if (remap_page_range(vma, vma->vm_start, virt_to_phys(db->rawbuf), size, vma->vm_page_prot)) + if (remap_pfn_range(vma, vma->vm_start, + virt_to_phys(db->rawbuf) >> PAGE_SHIFT, + size, vma->vm_page_prot)) goto out; db->mapped = 1; ret = 0;