ALSA: core: Drop snd_sgbuf_get_ptr()
authorTakashi Iwai <tiwai@suse.de>
Wed, 9 Jun 2021 16:25:48 +0000 (18:25 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 10 Jun 2021 08:15:21 +0000 (10:15 +0200)
snd_sgbuf_get_ptr() and its sibling snd_pcm_sgbuf_get_ptr() are no
longer used by any drivers.  Let's drop them.

Link: https://lore.kernel.org/r/20210609162551.7842-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/memalloc.h
include/sound/pcm.h

index 5daa937..3ab0844 100644 (file)
@@ -103,19 +103,6 @@ static inline dma_addr_t snd_sgbuf_get_addr(struct snd_dma_buffer *dmab,
        return addr + offset % PAGE_SIZE;
 }
 
-/*
- * return the virtual address at the corresponding offset
- */
-static inline void *snd_sgbuf_get_ptr(struct snd_dma_buffer *dmab,
-                                    size_t offset)
-{
-       struct snd_sg_buf *sgbuf = dmab->private_data;
-
-       if (!sgbuf)
-               return dmab->area + offset;
-       return sgbuf->table[offset >> PAGE_SHIFT].buf + offset % PAGE_SIZE;
-}
-
 unsigned int snd_sgbuf_get_chunk_size(struct snd_dma_buffer *dmab,
                                      unsigned int ofs, unsigned int size);
 #else
@@ -126,12 +113,6 @@ static inline dma_addr_t snd_sgbuf_get_addr(struct snd_dma_buffer *dmab,
        return dmab->addr + offset;
 }
 
-static inline void *snd_sgbuf_get_ptr(struct snd_dma_buffer *dmab,
-                                     size_t offset)
-{
-       return dmab->area + offset;
-}
-
 #define snd_sgbuf_get_chunk_size(dmab, ofs, size)      (size)
 
 #endif /* CONFIG_SND_DMA_SGBUF */
index bae9069..c4f418c 100644 (file)
@@ -1274,17 +1274,6 @@ snd_pcm_sgbuf_get_addr(struct snd_pcm_substream *substream, unsigned int ofs)
 }
 
 /**
- * snd_pcm_sgbuf_get_ptr - Get the virtual address at the corresponding offset
- * @substream: PCM substream
- * @ofs: byte offset
- */
-static inline void *
-snd_pcm_sgbuf_get_ptr(struct snd_pcm_substream *substream, unsigned int ofs)
-{
-       return snd_sgbuf_get_ptr(snd_pcm_get_dma_buf(substream), ofs);
-}
-
-/**
  * snd_pcm_sgbuf_get_chunk_size - Compute the max size that fits within the
  * contig. page from the given size
  * @substream: PCM substream