Commit e17aae16 authored by Cezary Rojewski's avatar Cezary Rojewski Committed by Vinod Koul

soundwire: Use snd_soc_substream_to_rtd() to obtain rtd

Utilize the helper function instead of casting from ->private_data
directly.
Signed-off-by: default avatarCezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20240219105206.335738-1-cezary.rojewski@intel.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 99fea943
...@@ -1718,7 +1718,7 @@ EXPORT_SYMBOL(sdw_deprepare_stream); ...@@ -1718,7 +1718,7 @@ EXPORT_SYMBOL(sdw_deprepare_stream);
static int set_stream(struct snd_pcm_substream *substream, static int set_stream(struct snd_pcm_substream *substream,
struct sdw_stream_runtime *sdw_stream) 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; struct snd_soc_dai *dai;
int ret = 0; int ret = 0;
int i; int i;
...@@ -1771,7 +1771,7 @@ EXPORT_SYMBOL(sdw_alloc_stream); ...@@ -1771,7 +1771,7 @@ EXPORT_SYMBOL(sdw_alloc_stream);
int sdw_startup_stream(void *sdw_substream) int sdw_startup_stream(void *sdw_substream)
{ {
struct snd_pcm_substream *substream = 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 sdw_stream_runtime *sdw_stream;
char *name; char *name;
int ret; int ret;
...@@ -1815,7 +1815,7 @@ EXPORT_SYMBOL(sdw_startup_stream); ...@@ -1815,7 +1815,7 @@ EXPORT_SYMBOL(sdw_startup_stream);
void sdw_shutdown_stream(void *sdw_substream) void sdw_shutdown_stream(void *sdw_substream)
{ {
struct snd_pcm_substream *substream = 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 sdw_stream_runtime *sdw_stream;
struct snd_soc_dai *dai; struct snd_soc_dai *dai;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment