From patchwork Mon Feb 19 10:52:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 203001 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp1203015dyc; Mon, 19 Feb 2024 02:50:31 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWf+poG6ul9SgACOjJMOoi6Kb5kjPwcr23mGU3mQasFtq7bOhJIfte81eSUbC4nVxY+XNjCN0zrvIgifWYcTtMTJUFYhA== X-Google-Smtp-Source: AGHT+IHAxEQgIvltPPKvz5RqEbgmRoVDv1p99hCP56NF1Z7nWOV4WXQDEh8bPIy8ltvhO7v/UUrD X-Received: by 2002:ac2:558d:0:b0:512:9af5:d083 with SMTP id v13-20020ac2558d000000b005129af5d083mr4258752lfg.60.1708339831214; Mon, 19 Feb 2024 02:50:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708339831; cv=pass; d=google.com; s=arc-20160816; b=K21DjxwD+lvrFm6L/iRmK8aWxqWsiGluCm6uuMn0F5IZoJHrUmdrwsuK+TbrM35HgH xiMs56gzcasTcCagQ79Bns7Lq2QcGuwHDqqJn939LFdEcrTvsnbgfvlZYuvthTSoM1jH 3tHpd2BEqI2AwWSVajcnVRxczVZio1V2r1mKAguTJkUP9zGnjqmdblDJCk4rvvQBxth/ zAHJch+hFP9mjicBQJLVHCJQPP5sma8PhXlrVg8K561nFtFpVqwx+7xfLcK9FgVuMRHD +TU/q76aP7b+OKGeaIdJYK6+PYcMqOuyCrLKteQ5sSY9Tehr8k4FiNOHP9KDiJofqLF2 CEnw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=D3bLRewoZVjP+pS+13vAFGbD2kwIKvCcVeU0zhyvu5A=; fh=gmb9dtY8ymF4qbjxh74ivBe3VGXGlvr7UQN7IdjTN7E=; b=BtLXsUDDypKbBUuWG8USRISANCZfUW011g2x2OvQHHrK0bINhigVO4mlQeYPw8i1Ix kyTBr+UKBYVjlcF00XpqnFHe/1Wday2QbsuQL8fbZt4lwD64Od0mjZewfp8kNQeYkeZf yUBRwrN9A/w9O3tweRYrJWVvrlKRlMVTcM0w/o/1thySTZCPxydvUCp1/b2vXOritAO2 aO8y4vI6m2/U4HKiRbX4z0YDaBc5+1XFHmci11xu2QNXhp8KHVLKJKlMnUKMdgrn89x0 I2V4AtugKg0WQDrCep1LAVRFxNi3zRCM/WNrmjzMchE7BRruLS6xH1/MyWKYJo9IkGY9 wGtw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Ud4+CxHB; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-71149-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71149-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id b61-20020a509f43000000b00564165a41cbsi2263587edf.231.2024.02.19.02.50.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 02:50:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71149-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Ud4+CxHB; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-71149-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71149-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id CCD341F2274F for ; Mon, 19 Feb 2024 10:50:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1257B2C194; Mon, 19 Feb 2024 10:50:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Ud4+CxHB" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1BDB924B5B; Mon, 19 Feb 2024 10:50:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708339817; cv=none; b=kUqiMNFGSaziYOzxPw+SH9HGpMgt5y36lnWRrLuSL+qOO3z/XDAPX1trVF0TtdB2qnBrx8VhcIEClPia0Nl5qHcARcuLN9jnN7izRA1CowMjSte16h+vw5NUomKzKjFiOQMmJTDh0TI6s+oUhC/z1Lp/HLHHIIXbp2E3GgFQ8SY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708339817; c=relaxed/simple; bh=dzTaso4wO+G6d/H8AhaEyUh/RCIlWQ/zztQlM6V9F0w=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=WuJAi/5SosCHXTv2bxk7BbvzcxWc4OKhSHXfdQjDOigb7JvNIXMy+NXoouIbyFlycw3WbOrNdSffVXY31hs3yGSSX0o4M3c8AaWUvsVw58sq4zTf+2F9XGneEfHM3Vu1R7ijoakUKmhLHs9+/Pj89KUdic2LWFAY+UT/GurhMdU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Ud4+CxHB; arc=none smtp.client-ip=192.198.163.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708339815; x=1739875815; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=dzTaso4wO+G6d/H8AhaEyUh/RCIlWQ/zztQlM6V9F0w=; b=Ud4+CxHBvPdYkQ0YiIgs+YpENL3Z5iRQK2Oei8QbyMkbg5JrlhbZTJQ7 GnqIXraBqwg8DMhUTerrPzWZi2+sHguEtAgFcYKrHw7oja25LruGmop+f ktWVYR2/yoKb5KS9JInElqVw3NER0Oxv0qlbTPTdkTDcY0Z7+JFk7dWww 9V0dbTz7UzR53Z7IwfPd3XKiN7XRypxIn4U/eEPUAxMvLRfhkXF2pCrm0 SvgLwbyphuj3eBkYjjP3ATvSjVB944Acm2xSLXmBumUfTKsEe8dSDmuei XAH191ZBnd+G7KG3/Vj1Um7E9iSJWirMAY1EYjCkyNDP2ry5Ivcy5KTFF Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10988"; a="6189524" X-IronPort-AV: E=Sophos;i="6.06,170,1705392000"; d="scan'208";a="6189524" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Feb 2024 02:50:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,170,1705392000"; d="scan'208";a="4616255" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by fmviesa008.fm.intel.com with ESMTP; 19 Feb 2024 02:50:12 -0800 From: Cezary Rojewski To: vkoul@kernel.org Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, broonie@kernel.org, pierre-louis.bossart@linux.intel.com, yung-chuan.liao@linux.intel.com, amadeuszx.slawinski@linux.intel.com, Cezary Rojewski Subject: [PATCH] soundwire: Use snd_soc_substream_to_rtd() to obtain rtd Date: Mon, 19 Feb 2024 11:52:06 +0100 Message-Id: <20240219105206.335738-1-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791324146487584734 X-GMAIL-MSGID: 1791324146487584734 Utilize the helper function instead of casting from ->private_data directly. Signed-off-by: Cezary Rojewski --- drivers/soundwire/stream.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c index f9c0adc0738d..4e9e7d2a942d 100644 --- a/drivers/soundwire/stream.c +++ b/drivers/soundwire/stream.c @@ -1718,7 +1718,7 @@ EXPORT_SYMBOL(sdw_deprepare_stream); static int set_stream(struct snd_pcm_substream *substream, struct sdw_stream_runtime *sdw_stream) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_dai *dai; int ret = 0; int i; @@ -1771,7 +1771,7 @@ EXPORT_SYMBOL(sdw_alloc_stream); int sdw_startup_stream(void *sdw_substream) { struct snd_pcm_substream *substream = sdw_substream; - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct sdw_stream_runtime *sdw_stream; char *name; int ret; @@ -1815,7 +1815,7 @@ EXPORT_SYMBOL(sdw_startup_stream); void sdw_shutdown_stream(void *sdw_substream) { struct snd_pcm_substream *substream = sdw_substream; - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct sdw_stream_runtime *sdw_stream; struct snd_soc_dai *dai;