ASoC: SOF: Drop superfluous snd_pcm_sgbuf_ops_page
authorTakashi Iwai <tiwai@suse.de>
Fri, 8 Nov 2019 09:46:38 +0000 (10:46 +0100)
committerTakashi Iwai <tiwai@suse.de>
Sat, 9 Nov 2019 17:02:53 +0000 (18:02 +0100)
snd_pcm_sgbuf_ops_page is no longer needed to be set explicitly to PCM
page ops since the recent change in the PCM core (*).  Leaving it NULL
should work as long as the preallocation has been done properly.

This patch drops the redundant lines.

(*) 7e8edae39fd1: ALSA: pcm: Handle special page mapping in the
                  default mmap handler

Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20191108094641.20086-6-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/soc/sof/pcm.c

index 3d5cd1b445ba0a9af8d7d9cf0fafea23ca6f91c1..549238a98b2ab5bda27d411ecd2de67bd427c24c 100644 (file)
@@ -454,17 +454,6 @@ static snd_pcm_uframes_t sof_pcm_pointer(struct snd_soc_component *component,
        return host;
 }
 
-#ifdef CONFIG_SND_DMA_SGBUF
-static struct page *sof_pcm_page(struct snd_soc_component *component,
-                                struct snd_pcm_substream *substream,
-                                unsigned long offset)
-{
-       return snd_pcm_sgbuf_ops_page(substream, offset);
-}
-#else
-#define sof_pcm_page   NULL
-#endif /* CONFIG_SND_DMA_SGBUF */
-
 static int sof_pcm_open(struct snd_soc_component *component,
                        struct snd_pcm_substream *substream)
 {
@@ -788,7 +777,6 @@ void snd_sof_new_platform_drv(struct snd_sof_dev *sdev)
        pd->hw_free = sof_pcm_hw_free;
        pd->trigger = sof_pcm_trigger;
        pd->pointer = sof_pcm_pointer;
-       pd->page = sof_pcm_page;
 
 #if IS_ENABLED(CONFIG_SND_SOC_SOF_COMPRESS)
        pd->compr_ops = &sof_compressed_ops;