From patchwork Fri Sep 29 10:55:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= X-Patchwork-Id: 13404074 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (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 0097BE7F154 for ; Fri, 29 Sep 2023 10:57:31 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 39765DE5; Fri, 29 Sep 2023 12:56:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 39765DE5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1695985049; bh=kPZ6wR/vAMk4xhV5l5oUC1T7NeXF+/f+Wn9iGkBY46s=; h=From:To:Cc:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=IwNazdoVkjELNGh3Ff3L287DME3j3G/KC+q62Tfe0/alRoZddibXqUQakVItOfgD1 egdWPYQJ6afjQOUFkCEHaN50foeV+g2WRDtNOSXu35c8Man2bDdfqKHJZksMmbTXYg p6mGIf7mM2LSZBB2bAV1vccQIp75Phg0EJWlDy/c= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 16458F8016A; Fri, 29 Sep 2023 12:56:08 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 9108AF800AE; Fri, 29 Sep 2023 12:56:07 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 56208F801D5; Fri, 29 Sep 2023 12:56:02 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 836EFF8007C for ; Fri, 29 Sep 2023 12:55:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 836EFF8007C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=SKnA9KZZ DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695984958; x=1727520958; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=kPZ6wR/vAMk4xhV5l5oUC1T7NeXF+/f+Wn9iGkBY46s=; b=SKnA9KZZvEOc7lGcfgrRKLVwOHU2ZuTsxMnjkmJ1zJvIi0bNe3JoxNrx VJiZT/twYT1FnlE8kuZlX4QYLXsbV1WDObbvRlp7SosXKNJiTZoyMuXra etmfEGRdCdcIhwgUPe+Hd7UdyIhZDey7xp5EWBTTfaapbTJ2E9TkMvOjn aCgs1QfJtFveDK7C3M174Mv9qFGTkrNz8NAb5AwRdR7ggBBCts/+ivqOg k/2U57lqj1mho3UIxlSVGyWzDVK/h2pegU1B6AS90yJLwpb6HuYnNTq26 CINUNltVxoJDiz7iFHnXvIiPArW1widkS4RGV6mFgNHbI7u50LcPllKCn Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10847"; a="372629968" X-IronPort-AV: E=Sophos;i="6.03,187,1694761200"; d="scan'208";a="372629968" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2023 03:55:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10847"; a="785062923" X-IronPort-AV: E=Sophos;i="6.03,187,1694761200"; d="scan'208";a="785062923" Received: from dev2 (HELO DEV2.igk.intel.com) ([10.237.148.94]) by orsmga001.jf.intel.com with ESMTP; 29 Sep 2023 03:55:37 -0700 From: =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= To: Vinod Koul Cc: Cezary Rojewski , Bard Liao , Pierre-Louis Bossart , Sanyog Kale , alsa-devel@alsa-project.org, =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= Subject: [PATCH] soundwire: Use snd_soc_substream_to_rtd() to obtain rtd Date: Fri, 29 Sep 2023 12:55:46 +0200 Message-Id: <20230929105546.774332-1-amadeuszx.slawinski@linux.intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Message-ID-Hash: O7WFZELA2TP5ZKDWEXSZFOLOQKFVSB6B X-Message-ID-Hash: O7WFZELA2TP5ZKDWEXSZFOLOQKFVSB6B X-MailFrom: amadeuszx.slawinski@linux.intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: <> List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Cezary Rojewski Utilize the helper function instead of casting from ->private_data directly. Signed-off-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński --- 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 69719b335bcb..652aae4e221d 100644 --- a/drivers/soundwire/stream.c +++ b/drivers/soundwire/stream.c @@ -1717,7 +1717,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; @@ -1770,7 +1770,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; @@ -1814,7 +1814,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;