Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1054458rdb; Mon, 19 Feb 2024 02:50:24 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVXM3cnU8RYf9nnCtwFUwM3wT3zNy9+TdKNnOSR4eecJX+yU5qVUUJ2TKWUxdkQXNFLXKwb8bw5J2B3a5A0WdHi9xl9RGuAkRpbmZAjbQ== X-Google-Smtp-Source: AGHT+IE+dw91Wumg8WL7pDCyoahIZYAaNbCUmGovHlszLClFgV9Tkz6k625evuSOI0Rp0nWg8NeQ X-Received: by 2002:aa7:c655:0:b0:561:8918:9f5d with SMTP id z21-20020aa7c655000000b0056189189f5dmr7936657edr.20.1708339824156; Mon, 19 Feb 2024 02:50:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708339824; cv=pass; d=google.com; s=arc-20160816; b=0QJGcEcYHjsRZzGkDpSICxETVM28xhqKYqDPeEmdiTrzQl/j21k2Y+mRPZJH8bCgNo HtqG4Z/5ufUVcAHfKxqcrb4/PtLKctQRwcgfVRzD/QdeBzcDeet3gtEREJzRv+MIsV11 1Ma9oYBg5etmFooIPPblpgtJdmguWB+Rw3X8SR895bSbea5y/P94eP3CT+iRHjD9JJeJ aBpVPLUqNEpv+TsAk96WDijVDc8W+Er7g5AtVId6+LpPg13POyO6PV/D3hs7r7kq2ion N1j/zzJjSWeERGQBlegYj/vReUCD2uKchej6vGQe5dd5x8Ref8PjTXdvV8k2y4H4kKdJ JTXQ== 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-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71149-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id v28-20020a50955c000000b00564881ab962si475163eda.205.2024.02.19.02.50.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 02:50:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71149-linux.lists.archive=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-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71149-linux.lists.archive=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 BE9981F2155D for ; Mon, 19 Feb 2024 10:50:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 18E3228DDA; Mon, 19 Feb 2024 10:50:18 +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 Content-Transfer-Encoding: 8bit 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; -- 2.25.1