vm: convert snd_pcm_lib_mmap_iomem() to vm_iomap_memory() helper

This is my example conversion of a few existing mmap users. The pcm
mmap case is one of the more straightforward ones.

Acked-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Changed files
+2 -10
sound
+2 -10
sound/core/pcm_native.c
··· 3222 3222 int snd_pcm_lib_mmap_iomem(struct snd_pcm_substream *substream, 3223 3223 struct vm_area_struct *area) 3224 3224 { 3225 - long size; 3226 - unsigned long offset; 3225 + struct snd_pcm_runtime *runtime = substream->runtime;; 3227 3226 3228 3227 area->vm_page_prot = pgprot_noncached(area->vm_page_prot); 3229 - area->vm_flags |= VM_IO; 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; 3228 + return vm_iomap_memory(area, runtime->dma_addr, runtime->dma_bytes); 3237 3229 } 3238 3230 3239 3231 EXPORT_SYMBOL(snd_pcm_lib_mmap_iomem);