From nobody Tue Jun 23 12:19:49 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84039C433EF for ; Sat, 5 Mar 2022 12:51:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231735AbiCEMwU (ORCPT ); Sat, 5 Mar 2022 07:52:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230155AbiCEMwU (ORCPT ); Sat, 5 Mar 2022 07:52:20 -0500 Received: from smtpbguseast3.qq.com (smtpbguseast3.qq.com [54.243.244.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BB9775C37 for ; Sat, 5 Mar 2022 04:51:26 -0800 (PST) X-QQ-mid: bizesmtp90t1646484673tmmsihaa Received: from localhost.localdomain ( [114.222.120.105]) by bizesmtp.qq.com (ESMTP) with id ; Sat, 05 Mar 2022 20:51:08 +0800 (CST) X-QQ-SSF: 01400000002000B0I000000A0000000 X-QQ-FEAT: GiB59JtT4hAixvUU2qMoUK1jxRaTIQvQpwNoHAYOtAikGp4o7FujPsm4KBCi+ uVQPuReEEfBKYprwtvfCTYJs5343XjPZY3W2QVV+JWWaMPx0guzNqRTPAMYx6Rp58oRc4Qy XdgY/PXb+IZhSwYshdtwFPgWq8tfStviCNxVXMLeOI0zc9hzZUt/89SWqZx/GJsbWsHaRvI bSK/lbPRwInv6hWY/wfJ6rY9NBPjWTq98g2GWfGbdihVmt1UXD8rDEDnxxSnv6kJI3k+oAh LxS/966DoHhRMeTB8/XwlQ0Z7t03Z/473ci74uTPQekaGGSF5HjDJbKaQPDCvv6Jw+KAd8e PWXuDcRZER2Ot/R0Fc= X-QQ-GoodBg: 1 From: zhanglianjie To: Jaroslav Kysela Cc: Cezary Rojewski , Pierre-Louis Bossart , Liam Girdwood , Jie Yang , Mark Brown , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, zhanglianjie Subject: [PATCH] ASoC: intel: use asoc_substream_to_rtd() Date: Sat, 5 Mar 2022 20:51:05 +0800 Message-Id: <20220305125105.142704-1-zhanglianjie@uniontech.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:uniontech.com:qybgforeign:qybgforeign1 X-QQ-Bgrelay: 1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: zhanglianjie diff --git a/sound/soc/intel/catpt/pcm.c b/sound/soc/intel/catpt/pcm.c index 939a9b801dec..a26000cd5ceb 100644 --- a/sound/soc/intel/catpt/pcm.c +++ b/sound/soc/intel/catpt/pcm.c @@ -74,7 +74,7 @@ static struct catpt_stream_template *catpt_topology[] =3D= { static struct catpt_stream_template * catpt_get_stream_template(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtm =3D substream->private_data; + struct snd_soc_pcm_runtime *rtm =3D asoc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai =3D asoc_rtd_to_cpu(rtm, 0); enum catpt_stream_type type; @@ -593,7 +593,7 @@ static int catpt_component_pcm_construct(struct snd_soc= _component *component, static int catpt_component_open(struct snd_soc_component *component, struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtm =3D substream->private_data; + struct snd_soc_pcm_runtime *rtm =3D asoc_substream_to_rtd(substream); if (!rtm->dai_link->no_pcm) snd_soc_set_runtime_hwparams(substream, &catpt_pcm_hardware); @@ -604,7 +604,7 @@ static snd_pcm_uframes_t catpt_component_pointer(struct snd_soc_component *component, struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtm =3D substream->private_data; + struct snd_soc_pcm_runtime *rtm =3D asoc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai =3D asoc_rtd_to_cpu(rtm, 0); struct catpt_stream_runtime *stream; struct catpt_dev *cdev =3D dev_get_drvdata(component->dev); -- 2.20.1