diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-21 13:16:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-21 13:16:56 -0400 |
commit | 12c71c4b601923a9cc28918e944ec1e8c65ddac9 (patch) | |
tree | 6644964fa831ea4f11451b05947da904726f76d5 /sound/core/pcm_native.c | |
parent | 830ac8524f301da8867400777d5c19e6d01ec525 (diff) | |
parent | f86b11fbc772b5a4926855c6bc1ff3a3d99995a7 (diff) |
Merge branch 'vm_ioremap_memory-examples'
I'm going to do an -rc8, so I'm just going to do this rather than delay
it any further. They are arguably stable material anyway.
* vm_ioremap_memory-examples:
mtdchar: remove no-longer-used vma helpers
vm: convert snd_pcm_lib_mmap_iomem() to vm_iomap_memory() helper
vm: convert fb_mmap to vm_iomap_memory() helper
vm: convert mtdchar mmap to vm_iomap_memory() helper
vm: convert HPET mmap to vm_iomap_memory() helper
Diffstat (limited to 'sound/core/pcm_native.c')
-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); |