Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp2056621lqa; Tue, 30 Apr 2024 07:13:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWKQDF4DFTt35q6fGYGeEfpekFlw6SDTNEyzfPuHsgVBoON7Aq3wu3eg1+3SA20HnGWGStl5DhULdGXWIVA8O1ccnRwqVru9mBqMN43uA== X-Google-Smtp-Source: AGHT+IFFE9Bglzg1FJ4JWGxbJ5lGGF43IdwlZf5yxvBMZ477FhrLWx6Wrn1i1EoPHpMhBuI3LQws X-Received: by 2002:a17:903:228c:b0:1eb:7162:82c7 with SMTP id b12-20020a170903228c00b001eb716282c7mr3825111plh.18.1714486388263; Tue, 30 Apr 2024 07:13:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714486388; cv=pass; d=google.com; s=arc-20160816; b=FQp8SM8QFy2HBBeE9UZKhTltSSitH+OsgBJ/PmITi4UOrbTU82oBHswaKHNSZqUSaG NYRO4+Z61EsxzDulzw4hwUCaa3KZp6lhBVzr93ybjA6Xs8uGM6/nwls6ivMePNSEljYe RIql5i/3SGi1pdhuBHX8DkZC2l4eoNPx6PjFUREPVOJXyGRfJsXvMNZHxT4hQPkZGUbV +YdFGQSr4sAzuhqlGYLDNESabE2h22SsBeE49aqNA+acOFMLZsphGkU2TWTgIPrQIAoU g7cVhozvfs9iTqHfeapvK6MPNIlVkJRDx9yeIDjefaq1o8kW3qvYSGRA3NJY7wCvk3I5 u0wA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=8wnYPNchoJMJHPXPE9uqd4IXLQ1+2DNP0wbgQTer3qE=; fh=/KkonnrNX2B7VoYx7X+VsyihoeDSq2Agb464wafnmW0=; b=lvpSf0HlNBNFb6R2MncLL1VHax5O2njFP1HkRRqsFpA2ytv6caKHTMBk5MV09TDMhu 1jN9UJC//3hhgYyYrfte6Ji6JH77QcBcHNel9eQCsMRqykWgR7gFs+X7PRL5FWeqlS63 KO/3iQzK/UA0wIQHywfDcHY02g7Wb7CrzbmT5oy5EXDCXnyQ7G52Fq1hnQmed7d2mO99 ppB9podfUU/KpGdLEyrdCX4DZ7S4utjmbSI4KYSdInQ0o00w/S3IET93gh7Wb1dDK3xj RJruRrA3tDa3Hgh2ofCwEyc+/S1JI5OfT5VwbDbFYUN6z6a0lcAX/TNw3iTOv/wLd4Ob B2/w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ldtTebgW; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-164075-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164075-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id p15-20020a170902780f00b001ea15bda1b0si13683343pll.452.2024.04.30.07.13.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 07:13:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-164075-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ldtTebgW; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-164075-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164075-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C1DB0283288 for ; Tue, 30 Apr 2024 14:11:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BF5EE179956; Tue, 30 Apr 2024 14:03:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ldtTebgW" Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 850AA179970 for ; Tue, 30 Apr 2024 14:03:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714485785; cv=none; b=JEWvgwCcp/AtJU1ph24zlaXW9eG9V0cedDb37rDu6MqbufLRIRjO/YfO2IybLd8lV4h+CKxqR4Y3tKbrXASbI14UWbq0t0milAasiscmK+0Lw55h0LVqDNSNRYjw/V2W+t9tw+8zIB8VyThnquZvEP8aZYUa6KwodPwBqmUljgY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714485785; c=relaxed/simple; bh=ZJVoQsuYVbU6eX1WKifNhQyvCwwvs/Q4umjN6N4+yu4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JciBAl7HM4yWtMT6bLW/GFFqA9t3yyKw0qoo6BYyuo0KF4WzFdOfXWywX4+4u4U2G/+ZllNyotRlnAp5+a0rtyb+9wISNBtFdQzUiJpBqlRDNG4KwUrdCEv6ogRbNf/CQ6KyoYIHleuRDbSBXpJUl/cCkP0p2wNMqluoB89uL4E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=ldtTebgW; arc=none smtp.client-ip=209.85.218.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ej1-f42.google.com with SMTP id a640c23a62f3a-a5872b74c44so646210066b.3 for ; Tue, 30 Apr 2024 07:03:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714485781; x=1715090581; darn=vger.kernel.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=8wnYPNchoJMJHPXPE9uqd4IXLQ1+2DNP0wbgQTer3qE=; b=ldtTebgWlJEzlLX5URZHyCeDlBnLJo17vVkTKPqhfmAzHM0S6AMjXqnlDPltjsOQMq JrVRkUUv/AiQ+FU0lMwKViuNVZ00cMd5W8NhR3Ab9dmNCPZ/9MVoqCw1n/G6GMfjp/Ec prqLaFJ4tZrWJXFR4vAQxLUvq4Fvk6PqQoEqFTvFZTXp4upNrbpcL6j1NLAtjbcgV9mr 5xyIiDDZTs4QcYSWRODOKRqABrkHrWeK9b3Vn2wBApmupjVhBwpb36eCvi58HZBMbZSD kSStiGAM1WqLfYMk/eg2fH+ud+ULPLKOk1/Leb9ijfkE+cLoXmuGDDintLheRTDy/kEj oiEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714485781; x=1715090581; 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=8wnYPNchoJMJHPXPE9uqd4IXLQ1+2DNP0wbgQTer3qE=; b=vK3CcdQjBdJ49flnEaZd/nxsoRPQuZFexCM7bbapgMawhk9VbaKmq3K/tJAgJlnsOY /kW1KaQaPGYkOcUVg+wfLhc0aciw5D925rsVKKCKMvjNGovoVazCjAFQClT09Am37Rcg 5KOqyzNoFjIv/gWnCuTg0PrqyKGV8uvfK8us3QGP5iKzXIX2G01pYf1CBNehQHrm8Fqw vrCjXfUPEFxfCjH22awxb/GKOwh1LYWkMoJ++mROB8g73HtjHe22MI7wcUg6jcT2V6sG 0iJQym/wkkLzvvfBbFUp/wMcdXCsckhTGovlBecZNBHWwqGSv4PtIuOie9Dyw7mrxWLa d9ZA== X-Forwarded-Encrypted: i=1; AJvYcCVLMZgTg4CjSyU10FekNMtgcHX+5AOK/XnBqKTiUKQJ1rSJue3IiwQGRACEcQHIIi6SMr/e3mzgv4qtbzytD1QYcMd3GYXCkPkY/f/d X-Gm-Message-State: AOJu0YxpsmzXtiSqUAfQIUcNHLl//BcTuv3P1iLEzHmPgvs3KgAIa/rs wrEsSOMuHbwg2czB2z9w7TSChRAXbvV58b4CtmKbQTfRnVX4/glSLCzA/T/TsPE= X-Received: by 2002:a17:907:76a4:b0:a58:94c1:88c9 with SMTP id jw4-20020a17090776a400b00a5894c188c9mr10358426ejc.54.1714485780892; Tue, 30 Apr 2024 07:03:00 -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.02.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 07:03:00 -0700 (PDT) From: Krzysztof Kozlowski Date: Tue, 30 Apr 2024 16:02:16 +0200 Subject: [PATCH 07/13] ASoC: img: Use snd_soc_substream_to_rtd() for accessing private_data Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240430-asoc-snd-substream-clean-v1-7-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=1453; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=ZJVoQsuYVbU6eX1WKifNhQyvCwwvs/Q4umjN6N4+yu4=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmMPnz7LqN72vQN5f6xW+8v1IAmdOUCMPS6bcOV 4KOBcs83WmJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZjD58wAKCRDBN2bmhouD 12uLD/wJ78QXDNb2piUOxSHgAlHla7As9001viT+koWXU/H7+DT8NtdMhT51dhbsQHiwJTtlPtD v3rC/wbLFAMaGDIiWvpnu6k+B052j/BXEI/AehuKgv4cRWhNtPKvFOKq1xqdWsRw0716H2t9hFG 2jji38Y55VThEkJU2s/2A+dyolipm/A2PYgxMVJTO2l5DA469GyAQo6sBIY2U/cunIB3Nd5iXjE Q3am7Lu9EXrAVEs3BW97SbLIHkYf0T5TAzmd8NGKPpDxyuCZXX18ORVI6i9N7ObF7t002ooK2kS ojdOtbdfw+8odlw1cUk0WmcG2BmcKgq60G25WepWhGsaV86YzAG4j0PmBLoDpKaIajgntlgaXru C59rV1W8tr/ZE1ju9NExCpppLGnkJdg1uS/O8ht/KxBbXbi7EIaeuB9CgaJ61HQpTjOo7fl4Wbf Rpr2d48ma59TnUEfG2V3VYPvbYQlMec8a+1gOtwjG9C7eGdUDWFPtphMaW/PQOdGdwQE6of966h 08q8aydTVqPyc6BlBswO7GuRGZvbVbSjXzYlnWR3btBq5N/fAyyLJVZQAR/CLmHCNxuMnquGLnh Ki9ObapaRsHnKsbyLXLqmRwcEn/t2Ywexl6X3EbXj9/YMjD5OQJehn/bvQ8tFvT1+BObAtIFNxa lE5v1KAME9l6c0Q== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Do not open-code snd_soc_substream_to_rtd(). Signed-off-by: Krzysztof Kozlowski --- sound/soc/img/img-i2s-in.c | 2 +- sound/soc/img/img-i2s-out.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/img/img-i2s-in.c b/sound/soc/img/img-i2s-in.c index dacc29fcf24b..b69a364d619e 100644 --- a/sound/soc/img/img-i2s-in.c +++ b/sound/soc/img/img-i2s-in.c @@ -395,7 +395,7 @@ static int img_i2s_in_dma_prepare_slave_config(struct snd_pcm_substream *st, struct snd_pcm_hw_params *params, struct dma_slave_config *sc) { unsigned int i2s_channels = params_channels(params) / 2; - struct snd_soc_pcm_runtime *rtd = st->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(st); struct snd_dmaengine_dai_dma_data *dma_data; int ret; diff --git a/sound/soc/img/img-i2s-out.c b/sound/soc/img/img-i2s-out.c index f442d985ab87..6f9831c6d6e0 100644 --- a/sound/soc/img/img-i2s-out.c +++ b/sound/soc/img/img-i2s-out.c @@ -401,7 +401,7 @@ static int img_i2s_out_dma_prepare_slave_config(struct snd_pcm_substream *st, struct snd_pcm_hw_params *params, struct dma_slave_config *sc) { unsigned int i2s_channels = params_channels(params) / 2; - struct snd_soc_pcm_runtime *rtd = st->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(st); struct snd_dmaengine_dai_dma_data *dma_data; int ret; -- 2.43.0