diff options
-rw-r--r-- | sound/core/pcm_native.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index 71ae86ca64ac..eb560fa32321 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c | |||
@@ -3222,18 +3222,10 @@ EXPORT_SYMBOL_GPL(snd_pcm_lib_default_mmap); | |||
3222 | int snd_pcm_lib_mmap_iomem(struct snd_pcm_substream *substream, | 3222 | int snd_pcm_lib_mmap_iomem(struct snd_pcm_substream *substream, |
3223 | struct vm_area_struct *area) | 3223 | struct vm_area_struct *area) |
3224 | { | 3224 | { |
3225 | long size; | 3225 | struct snd_pcm_runtime *runtime = substream->runtime;; |
3226 | unsigned long offset; | ||
3227 | 3226 | ||
3228 | area->vm_page_prot = pgprot_noncached(area->vm_page_prot); | 3227 | area->vm_page_prot = pgprot_noncached(area->vm_page_prot); |
3229 | area->vm_flags |= VM_IO; | 3228 | return vm_iomap_memory(area, runtime->dma_addr, runtime->dma_bytes); |
3230 | size = area->vm_end - area->vm_start; | ||
3231 | offset = area->vm_pgoff << PAGE_SHIFT; | ||
3232 | if (io_remap_pfn_range(area, area->vm_start, | ||
3233 | (substream->runtime->dma_addr + offset) >> PAGE_SHIFT, | ||
3234 | size, area->vm_page_prot)) | ||
3235 | return -EAGAIN; | ||
3236 | return 0; | ||
3237 | } | 3229 | } |
3238 | 3230 | ||
3239 | EXPORT_SYMBOL(snd_pcm_lib_mmap_iomem); | 3231 | EXPORT_SYMBOL(snd_pcm_lib_mmap_iomem); |