|
@@ -3156,8 +3156,8 @@ static const struct vm_operations_struct snd_pcm_vm_ops_data_fault = {
|
|
/*
|
|
/*
|
|
* mmap the DMA buffer on RAM
|
|
* mmap the DMA buffer on RAM
|
|
*/
|
|
*/
|
|
-static int snd_pcm_default_mmap(struct snd_pcm_substream *substream,
|
|
|
|
- struct vm_area_struct *area)
|
|
|
|
|
|
+int snd_pcm_lib_default_mmap(struct snd_pcm_substream *substream,
|
|
|
|
+ struct vm_area_struct *area)
|
|
{
|
|
{
|
|
area->vm_flags |= VM_RESERVED;
|
|
area->vm_flags |= VM_RESERVED;
|
|
#ifdef ARCH_HAS_DMA_MMAP_COHERENT
|
|
#ifdef ARCH_HAS_DMA_MMAP_COHERENT
|
|
@@ -3177,6 +3177,7 @@ static int snd_pcm_default_mmap(struct snd_pcm_substream *substream,
|
|
area->vm_ops = &snd_pcm_vm_ops_data_fault;
|
|
area->vm_ops = &snd_pcm_vm_ops_data_fault;
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
+EXPORT_SYMBOL_GPL(snd_pcm_lib_default_mmap);
|
|
|
|
|
|
/*
|
|
/*
|
|
* mmap the DMA buffer on I/O memory area
|
|
* mmap the DMA buffer on I/O memory area
|
|
@@ -3242,7 +3243,7 @@ int snd_pcm_mmap_data(struct snd_pcm_substream *substream, struct file *file,
|
|
if (substream->ops->mmap)
|
|
if (substream->ops->mmap)
|
|
err = substream->ops->mmap(substream, area);
|
|
err = substream->ops->mmap(substream, area);
|
|
else
|
|
else
|
|
- err = snd_pcm_default_mmap(substream, area);
|
|
|
|
|
|
+ err = snd_pcm_lib_default_mmap(substream, area);
|
|
if (!err)
|
|
if (!err)
|
|
atomic_inc(&substream->mmap_count);
|
|
atomic_inc(&substream->mmap_count);
|
|
return err;
|
|
return err;
|