Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3018742imm; Sun, 1 Jul 2018 10:24:32 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ/LyibCWwcXAIMFmlmbHaOhMwPQ1HUPrW88dUT9yaAFd7zlS1OeIkMv/39N0at7kmDBD6q X-Received: by 2002:a63:743:: with SMTP id 64-v6mr19623441pgh.216.1530465872144; Sun, 01 Jul 2018 10:24:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530465872; cv=none; d=google.com; s=arc-20160816; b=uroYwCQa8+Gfnouc62vobpMjhn89IN8NZsGYgh/KBTo5qJeLDfMxM5KzO+8dC4B8ZN W9u33haFGXXdvAzyO7W0qoCCsQvrmIkhN2OFCNAE37ZoaXiQ2u+1ei4CyS5Mw55Myq59 D3DHh5bflzrU4Dm3YQE/f5f+iKQ48vJ/DIbi9EZ6Ezh2jN87NWXYfwhbaEfm2Bgw+HEc MEupA66lpUeZ3+h5/aYaHsr95omLOLet1xmJsOSWqwVkl164iKv0K9iR8GdXQ9LUUb23 9jQZLVEtBtb0KHZEeuHFddt68TPnCdH7xDKfTh55PHwPaJTa1SBc2WKBj72LOuhrYuIp 9zMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=NP+BVq8YmO5+teEnp9pWnQYaQc/Z4NN08rHwpvKy+VU=; b=eTke///iSr/iF6tcfCXSIVvnMAZY05hlhPBMGvRk3M9BR30Kmj6sBCf7mSafDuEXh6 s85AVlsPftzuOoYolQWt4L7hyty8BtrIBaRh1TGCcOETVvjxd7WII68/fss3M/6lZSu5 UeERPQP5g5zDHSAYBPQ1uJ+9Je2G74E7Uqf/KhOTL8PBts4EckvoUsEQtti8ceVrZrBL qiio2vX3GN9K9j5xIBbw7u/WAraFQqmsne06VDyyJ94kPLyvDmfUAsecgkGTf4a1re3A E8f3i0jRa9hXpWV3tjxGWBr68Z2xL8GM4MK16jZqu6usyfdQf2ZiMhuBLqAYIycD8FKr fxjQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b5-v6si9090444pfo.54.2018.07.01.10.24.17; Sun, 01 Jul 2018 10:24:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031488AbeGAQhs (ORCPT + 99 others); Sun, 1 Jul 2018 12:37:48 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:36392 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031475AbeGAQhn (ORCPT ); Sun, 1 Jul 2018 12:37:43 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id BEE48A73; Sun, 1 Jul 2018 16:37:42 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, KaiChieh Chuang , Mark Brown Subject: [PATCH 4.17 028/220] ASoC: mediatek: preallocate pages use platform device Date: Sun, 1 Jul 2018 18:20:52 +0200 Message-Id: <20180701160909.514761033@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180701160908.272447118@linuxfoundation.org> References: <20180701160908.272447118@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.17-stable review patch. If anyone has any objections, please let me know. ------------------ From: Kai Chieh Chuang commit 5845e6155d8f4a4a9bae2d4c1d1bb4a4d9a925c2 upstream. preallocate pages should use platform device, since we set dma mask for platform device. Signed-off-by: KaiChieh Chuang Signed-off-by: Mark Brown Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- sound/soc/mediatek/common/mtk-afe-platform-driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/sound/soc/mediatek/common/mtk-afe-platform-driver.c +++ b/sound/soc/mediatek/common/mtk-afe-platform-driver.c @@ -64,14 +64,14 @@ static const struct snd_pcm_ops mtk_afe_ 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 snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME); struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component); 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)