From patchwork Tue Apr 30 14:02:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13649233 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 98FD5C4345F for ; Tue, 30 Apr 2024 14:05:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dOvOy+df6V0owO7VMdQAOwx2BLuZinh0XdE/1Cxupiw=; b=KKv6vcVgqtgVm3 NaKghOk/GIb5QCv360TOsq+afnJf0oVhyRWrhVT+Wb/ZIJZ2wZ1z0n7QDxofAhpEyjPB9wVaq5pNd d86xUjsvQmkKG+WKYTuytlwvDK7E+3poXKfeo2nBn5iyspRzlE6tHS+gquDiokq0HQJXSTEZY0ToI Ydy99BG0rxcDV2qUhv58fKUrA6DZA+tpLsDkWYB5cnhuZtpMVLczSi3PjtEYfiuyyeJv4sDuQwD7a U/CCjDNYPUF5W9GOMbCKhDfdDDh7s+NT7AXSmRdE9Mvw1dI7S9rJE5iH6FeeQ1KlyuW2DuFlhN84l TBsRdiLEriOActTnIEBw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1o6x-00000006gF3-2zLs; Tue, 30 Apr 2024 14:05:35 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1o4w-00000006egS-1eLF for linux-arm-kernel@bombadil.infradead.org; Tue, 30 Apr 2024 14:03:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Reply-To:Content-ID:Content-Description; bh=yC31R3m8W6wP+grnNVF/H3dyhG6qnKQukTpoDRo2U3E=; b=DvSj7i0RbnT4yzKh0dMiaK1hIj ZdfPB5/AUbfvsW6SL5o/pWvbmvGVJ+kl7VUxPZDFlWvfgvTv7UvjaiOSZ5Ra8KNTzQXSr76du5sjj 005MJW3KQ5yBCYCsQpDymPThaJou9c9a3tfTW/CAtxSOzQIcclELoUTE5UgD+XOD9BvZ/svwXq51e KGGK/ESgBZ/GR+sNmVkxfvINBhCh0CcmE1f9K1Wjf8yG1w33OnTw3wC3aDUlWYMEwjGCzXEGrbQ5o SjdpDGnFa+kSqKLu/WVsrqZhFDRGnOzExZ1GHnKroRbS/1wo/s3fneLzirD/9X7xORs9gtazgBg8l 1TsflVFQ==; Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1o4q-0000000GyiI-0rbZ for linux-arm-kernel@lists.infradead.org; Tue, 30 Apr 2024 14:03:29 +0000 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a51a7d4466bso632783766b.2 for ; Tue, 30 Apr 2024 07:03:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714485802; x=1715090602; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=yC31R3m8W6wP+grnNVF/H3dyhG6qnKQukTpoDRo2U3E=; b=ouYixkxWvUUG2RrzCW2TJS6IbUziPFGfVOOlN/++CGs1ML+beWrIuvdKphgaY77oDp 0eMcE+lt90Cu/FoXn2170i00bHnciVXp01FMtIg2K5bQ0YCpjXYBouBVjKPD+Ni+ykV2 jsnI7AhFQcZ6KwLyr0Mg0o3NHHwwlTKUIKWaG65V18BR2fawZAfroBU5wTr2iYjqx1oG hJOa8fFE/sfsdNJDTiDVfbmYG2F6xme1nQ8ZcNf1d1PbPIAMUa3UwGb+UPSZijy9gd58 6tBaW2lxJTm5ERpCrqjHdGtIVHlmujiDuQex+89Sy1KQ2DzjrCd1wPXDTPV/oA5QRSWI wSgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714485802; x=1715090602; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yC31R3m8W6wP+grnNVF/H3dyhG6qnKQukTpoDRo2U3E=; b=Q+aam18KrWDDxrEk8QxZ7/CxnFXbHHcR9zNWFeF+hTjtpnbUrreK72kvMIzUlj1RnJ 98DlWLxDhwTJk+6FBmNBr0/T667DeGyJ/gllU2+hy5lOKTCBVS4eG2ccZ4P5CypnM5Qz RobhIpm1EQ5/5ES02xSD8/tTNUFrrCVZkwyvsBX/YIZ8SOVqvw2W6Q5GSvS7lsE77EfY q1ZksXzFSNyyMJn5kAtdo3m8L3U5MUcAnK12ArQUbxk6ifMbUIzi1ne7Kxoy0xQvvvPv 5OlZE1ns2+5u7fCmIh3r1oGIWXdu+NUasIa63WH1M6DBB1b5LVzjwUAGYKVoh3ODxRQ7 LIyg== X-Forwarded-Encrypted: i=1; AJvYcCVrL8mgyEhkRz0m1ivN9t9pv10ugmqqhcks6WWssFx1ZbOamuPykQ/FvraAUWzz97SD1IPwHu+RRmskpr798Y0IuYUtWjD/zYC5q3l2pQ9LuTlskY4= X-Gm-Message-State: AOJu0YxGZu+WOj1dTmCGJswVic45OSfuWLyjXhLU3CXRCNv5lgH9uhqA YCsySHW9rsTls4b2f3D2+/OqnIjS/+rYAu5FojkRu9zWx/4YpuuzPVmhGuSLzDI= X-Google-Smtp-Source: AGHT+IHSymzbs0C8MGLs3EVai6AvWaGt9IGpYcAnz/QtQsZ0owRN86WOYk4l43txKHjNaleFCNL96Q== X-Received: by 2002:a17:906:b78c:b0:a58:ff19:1bd7 with SMTP id dt12-20020a170906b78c00b00a58ff191bd7mr4814671ejb.24.1714485802359; Tue, 30 Apr 2024 07:03:22 -0700 (PDT) Received: from [127.0.1.1] ([178.197.223.16]) by smtp.gmail.com with ESMTPSA id pv27-20020a170907209b00b00a5940af3f67sm31434ejb.16.2024.04.30.07.03.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 07:03:21 -0700 (PDT) From: Krzysztof Kozlowski Date: Tue, 30 Apr 2024 16:02:22 +0200 Subject: [PATCH 13/13] ASoC: sunxi: Use snd_soc_substream_to_rtd() for accessing private_data MIME-Version: 1.0 Message-Id: <20240430-asoc-snd-substream-clean-v1-13-6f8a8902b479@linaro.org> References: <20240430-asoc-snd-substream-clean-v1-0-6f8a8902b479@linaro.org> In-Reply-To: <20240430-asoc-snd-substream-clean-v1-0-6f8a8902b479@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Thierry Reding , Jonathan Hunter , Peter Ujfalusi , Jarkko Nikula , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Shengjiu Wang , Xiubo Li , Fabio Estevam , Nicolin Chen , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Matthias Brugger , AngeloGioacchino Del Regno , Jerome Brunet , Neil Armstrong , Kevin Hilman , Martin Blumenstingl , Sylwester Nawrocki , Ban Tao , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, imx@lists.linux.dev, linux-mediatek@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=855; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=skJQwkduJ0UqVILLbpIVR8oru+2QUc2pKBYrAAVKHLI=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmMPn42nKdNBa2rMr1pgKaAGhX7w0XUyPtyKW9V bUEsOjG4LCJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZjD5+AAKCRDBN2bmhouD 147DD/4ieg9gyFCb0g9PJBqL29gkEXs/qxtb2TaodG03VYLhq+fFzv2vOzJZhszAb1VOkS8eI0F KlbKY9lyGbdzA1h6zSNA0p/UgvlOtsdv4xC+0KT0yy7TXAza83A9DSl1qDnkNTdOFgc42e1+9FU eaGGfDloUavMXd6rNB7SRZMQRcm41b47P/mRzEa2cA1bjkAlrlBm6NwPeVLP5A/Kcr3Tb3EZ2pI HgLvCY5h27fuJYugwmxUMfqOjXMdWLx9SSAQ5yfhuYZZBgKU100MiFOvcW2nlDlhncmjU0WcU5t H7ySW9GYOdqAqEkELNGxb97j0Ov7StcHdE1uz4YmdansE+m8dNQTp3CaZ4LdH2+2TFF/sP4aynu H2GUeJKaC1N/Ng+cEI1h0gMDXKbR8qyTg+SjoM6i7+5UP1I2coCVMYrneh2dpEyJOp9MNFOvj5d UzzEQMRQeFilQTHwB3xynjKLIUqJbjhqfafH5A0FECh/lb7OoM+PTU7VciDC4L/s1Xl/NOiJCnq 69WLOXnti2pJsaGzvUMsSHAlokIA+7NRIpUewkiHs/lN9zgB7QfsX/zvrQTookURZBTMehAN/cd yW7Vl73L2bSpn6CppvaD8hpkm5+NhqYeNWbMxnKsVdyQiMo84C2YNgI+3cBxRRpVQUYuh98RXgk h6j6UQIf5KNOdKQ== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240430_150324_772518_E701783A X-CRM114-Status: GOOD ( 14.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Do not open-code snd_soc_substream_to_rtd(). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Jernej Skrabec --- sound/soc/sunxi/sun50i-dmic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sunxi/sun50i-dmic.c b/sound/soc/sunxi/sun50i-dmic.c index c76628bc86c6..fedfa4fc95fb 100644 --- a/sound/soc/sunxi/sun50i-dmic.c +++ b/sound/soc/sunxi/sun50i-dmic.c @@ -74,7 +74,7 @@ static const struct dmic_rate dmic_rate_s[] = { static int sun50i_dmic_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *cpu_dai) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct sun50i_dmic_dev *host = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); /* only support capture */