diff options
author | Kai Chieh Chuang <kaichieh.chuang@mediatek.com> | 2018-04-27 05:11:35 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-17 12:39:22 +0300 |
commit | 77f738e84293f10980ea94cbcf57a8f204295f78 (patch) | |
tree | e2bd067435d71dc22315586fba7411b059220dd7 /sound | |
parent | 99ebaf4f43dd25e18baf02c994c7939f1257f8a3 (diff) | |
download | linux-77f738e84293f10980ea94cbcf57a8f204295f78.tar.xz |
ASoC: mediatek: preallocate pages use platform device
commit 5845e6155d8f4a4a9bae2d4c1d1bb4a4d9a925c2 upstream.
preallocate pages should use platform device,
since we set dma mask for platform device.
Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/mediatek/common/mtk-afe-platform-driver.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/mediatek/common/mtk-afe-platform-driver.c b/sound/soc/mediatek/common/mtk-afe-platform-driver.c index 82d439c15f4e..e58fbefa5e6b 100644 --- a/sound/soc/mediatek/common/mtk-afe-platform-driver.c +++ b/sound/soc/mediatek/common/mtk-afe-platform-driver.c @@ -63,13 +63,13 @@ static const struct snd_pcm_ops mtk_afe_pcm_ops = { static int mtk_afe_pcm_new(struct snd_soc_pcm_runtime *rtd) { size_t size; - struct snd_card *card = rtd->card->snd_card; struct snd_pcm *pcm = rtd->pcm; struct mtk_base_afe *afe = snd_soc_platform_get_drvdata(rtd->platform); size = afe->mtk_afe_hardware->buffer_bytes_max; return snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, - card->dev, size, size); + rtd->platform->dev, + size, size); } static void mtk_afe_pcm_free(struct snd_pcm *pcm) |