ASoC: intel: Drop superfluous snd_pcm_sgbuf_ops_page
authorTakashi Iwai <tiwai@suse.de>
Fri, 8 Nov 2019 09:46:36 +0000 (10:46 +0100)
committerTakashi Iwai <tiwai@suse.de>
Sat, 9 Nov 2019 17:02:52 +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-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/soc/intel/haswell/sst-haswell-pcm.c
sound/soc/intel/skylake/skl-pcm.c

index 6e498a581d20a042d5c25bd419bbbafb237f54ad..a3a5bba2fbd996809ea6ae651108fefc723c7f12 100644 (file)
@@ -796,17 +796,6 @@ static snd_pcm_uframes_t hsw_pcm_pointer(struct snd_soc_component *component,
        return offset;
 }
 
-#ifdef CONFIG_SND_DMA_SGBUF
-static struct page *hsw_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 hsw_pcm_page NULL
-#endif /* CONFIG_SND_DMA_SGBUF */
-
 static int hsw_pcm_open(struct snd_soc_component *component,
                        struct snd_pcm_substream *substream)
 {
@@ -1128,7 +1117,6 @@ static const struct snd_soc_component_driver hsw_dai_component = {
        .hw_free        = hsw_pcm_hw_free,
        .trigger        = hsw_pcm_trigger,
        .pointer        = hsw_pcm_pointer,
-       .page           = hsw_pcm_page,
        .ioctl          = snd_soc_pcm_lib_ioctl,
        .pcm_construct  = hsw_pcm_new,
        .controls       = hsw_volume_controls,
index 0850141c7d47650d3b52c83e6d6bc8ca3e750dad..6bd14f65fe71a8315483d3bc8957f612927fd5a2 100644 (file)
@@ -1235,17 +1235,6 @@ static int skl_platform_soc_mmap(struct snd_soc_component *component,
        return snd_pcm_lib_default_mmap(substream, area);
 }
 
-#ifdef CONFIG_SND_DMA_SGBUF
-static struct page *skl_platform_soc_page(struct snd_soc_component *component,
-                                         struct snd_pcm_substream *substream,
-                                         unsigned long offset)
-{
-       return snd_pcm_sgbuf_ops_page(substream, offset);
-}
-#else
-#define skl_platform_soc_page NULL
-#endif /* CONFIG_SND_DMA_SGBUF */
-
 static u64 skl_adjust_codec_delay(struct snd_pcm_substream *substream,
                                u64 nsec)
 {
@@ -1493,7 +1482,6 @@ static const struct snd_soc_component_driver skl_component  = {
        .pointer        = skl_platform_soc_pointer,
        .get_time_info  = skl_platform_soc_get_time_info,
        .mmap           = skl_platform_soc_mmap,
-       .page           = skl_platform_soc_page,
        .pcm_construct  = skl_platform_soc_new,
        .pcm_destruct   = skl_platform_soc_free,
        .module_get_upon_open = 1, /* increment refcount when a pcm is opened */