* [PATCH] soundwire: Use snd_soc_substream_to_rtd() to obtain rtd
@ 2024-02-19 10:52 Cezary Rojewski
2024-03-03 14:01 ` Vinod Koul
0 siblings, 1 reply; 5+ messages in thread
From: Cezary Rojewski @ 2024-02-19 10:52 UTC (permalink / raw)
To: vkoul
Cc: alsa-devel, linux-sound, linux-kernel, broonie,
pierre-louis.bossart, yung-chuan.liao, amadeuszx.slawinski,
Cezary Rojewski
Utilize the helper function instead of casting from ->private_data
directly.
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
---
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] soundwire: Use snd_soc_substream_to_rtd() to obtain rtd
2024-02-19 10:52 [PATCH] soundwire: Use snd_soc_substream_to_rtd() to obtain rtd Cezary Rojewski
@ 2024-03-03 14:01 ` Vinod Koul
0 siblings, 0 replies; 5+ messages in thread
From: Vinod Koul @ 2024-03-03 14:01 UTC (permalink / raw)
To: Cezary Rojewski
Cc: alsa-devel, linux-sound, linux-kernel, broonie,
pierre-louis.bossart, yung-chuan.liao, amadeuszx.slawinski
On Mon, 19 Feb 2024 11:52:06 +0100, Cezary Rojewski wrote:
> Utilize the helper function instead of casting from ->private_data
> directly.
>
>
Applied, thanks!
[1/1] soundwire: Use snd_soc_substream_to_rtd() to obtain rtd
commit: e17aae16acf53938deb4b7702aa4f6cee2c4a073
Best regards,
--
~Vinod
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] soundwire: Use snd_soc_substream_to_rtd() to obtain rtd
2023-09-29 10:55 Amadeusz Sławiński
2023-10-16 11:20 ` Vinod Koul
@ 2024-03-03 14:01 ` Vinod Koul
1 sibling, 0 replies; 5+ messages in thread
From: Vinod Koul @ 2024-03-03 14:01 UTC (permalink / raw)
To: Amadeusz Sławiński
Cc: Cezary Rojewski, Bard Liao, Pierre-Louis Bossart, Sanyog Kale,
alsa-devel
On Fri, 29 Sep 2023 12:55:46 +0200, Amadeusz Sławiński wrote:
> Utilize the helper function instead of casting from ->private_data
> directly.
>
>
Applied, thanks!
[1/1] soundwire: Use snd_soc_substream_to_rtd() to obtain rtd
commit: e17aae16acf53938deb4b7702aa4f6cee2c4a073
Best regards,
--
~Vinod
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] soundwire: Use snd_soc_substream_to_rtd() to obtain rtd
2023-09-29 10:55 Amadeusz Sławiński
@ 2023-10-16 11:20 ` Vinod Koul
2024-03-03 14:01 ` Vinod Koul
1 sibling, 0 replies; 5+ messages in thread
From: Vinod Koul @ 2023-10-16 11:20 UTC (permalink / raw)
To: Amadeusz Sławiński
Cc: Cezary Rojewski, Bard Liao, Pierre-Louis Bossart, Sanyog Kale,
alsa-devel
On 29-09-23, 12:55, Amadeusz Sławiński wrote:
> From: Cezary Rojewski <cezary.rojewski@intel.com>
>
> Utilize the helper function instead of casting from ->private_data
> directly.
>
> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
> Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
> ---
> 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);
This does not exist for me, so I guess you can resend it after next
cycle when this appears in rc1
--
~Vinod
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] soundwire: Use snd_soc_substream_to_rtd() to obtain rtd
@ 2023-09-29 10:55 Amadeusz Sławiński
2023-10-16 11:20 ` Vinod Koul
2024-03-03 14:01 ` Vinod Koul
0 siblings, 2 replies; 5+ messages in thread
From: Amadeusz Sławiński @ 2023-09-29 10:55 UTC (permalink / raw)
To: Vinod Koul
Cc: Cezary Rojewski, Bard Liao, Pierre-Louis Bossart, Sanyog Kale,
alsa-devel, Amadeusz Sławiński
From: Cezary Rojewski <cezary.rojewski@intel.com>
Utilize the helper function instead of casting from ->private_data
directly.
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
---
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;
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-03-03 14:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-19 10:52 [PATCH] soundwire: Use snd_soc_substream_to_rtd() to obtain rtd Cezary Rojewski
2024-03-03 14:01 ` Vinod Koul
-- strict thread matches above, loose matches on Subject: below --
2023-09-29 10:55 Amadeusz Sławiński
2023-10-16 11:20 ` Vinod Koul
2024-03-03 14:01 ` Vinod Koul
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.