summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2024-11-13 14:16:27 +0300
committerTakashi Iwai <tiwai@suse.de>2024-11-13 15:33:28 +0300
commitf69c2861b05e29c69abed6aafe0cefd224d9d4db (patch)
treece5843608d2682dd76613db6ff47d82217558af3 /include
parent8f80f378e77eafdcdb7ea9a76cc645ecd04fb4e5 (diff)
downloadlinux-f69c2861b05e29c69abed6aafe0cefd224d9d4db.tar.xz
ALSA: pcm: Define snd_pcm_mmap_data_{open|close}() locally
snd_pcm_mmap_data_open() and _close() are defined as inline functions in the public sound/pcm.h, but those are used only locally in pcm_native.c, hence they should be better placed there. Also, those are referred as callbacks, the useless inline is dropped. Link: https://patch.msgid.link/20241113111628.17069-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include')
-rw-r--r--include/sound/pcm.h24
1 files changed, 0 insertions, 24 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index ef9cbeaf3784..67c99ffbf51b 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -1393,30 +1393,6 @@ snd_pcm_sgbuf_get_chunk_size(struct snd_pcm_substream *substream,
return snd_sgbuf_get_chunk_size(snd_pcm_get_dma_buf(substream), ofs, size);
}
-/**
- * snd_pcm_mmap_data_open - increase the mmap counter
- * @area: VMA
- *
- * PCM mmap callback should handle this counter properly
- */
-static inline void snd_pcm_mmap_data_open(struct vm_area_struct *area)
-{
- struct snd_pcm_substream *substream = (struct snd_pcm_substream *)area->vm_private_data;
- atomic_inc(&substream->mmap_count);
-}
-
-/**
- * snd_pcm_mmap_data_close - decrease the mmap counter
- * @area: VMA
- *
- * PCM mmap callback should handle this counter properly
- */
-static inline void snd_pcm_mmap_data_close(struct vm_area_struct *area)
-{
- struct snd_pcm_substream *substream = (struct snd_pcm_substream *)area->vm_private_data;
- atomic_dec(&substream->mmap_count);
-}
-
int snd_pcm_lib_default_mmap(struct snd_pcm_substream *substream,
struct vm_area_struct *area);
/* mmap for io-memory area */