All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: greybus: audio: constify snd_soc_dai_ops structures
@ 2017-08-21  4:58 Arvind Yadav
  2017-08-21 15:30 ` Mark Greer
  0 siblings, 1 reply; 2+ messages in thread
From: Arvind Yadav @ 2017-08-21  4:58 UTC (permalink / raw)
  To: vaibhav.sr, mgreer, johan, elder, gregkh; +Cc: linux-kernel, greybus-dev, devel

snd_soc_dai_ops are not supposed to change at runtime. All functions
working with snd_soc_dai_ops provided by <sound/soc-dai.h> work with
const snd_soc_dai_ops. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/staging/greybus/audio_codec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c
index 25c8bb4..a6d01f0 100644
--- a/drivers/staging/greybus/audio_codec.c
+++ b/drivers/staging/greybus/audio_codec.c
@@ -674,7 +674,7 @@ static int gbcodec_mute_stream(struct snd_soc_dai *dai, int mute, int stream)
 	return ret;
 }
 
-static struct snd_soc_dai_ops gbcodec_dai_ops = {
+static const struct snd_soc_dai_ops gbcodec_dai_ops = {
 	.startup = gbcodec_startup,
 	.shutdown = gbcodec_shutdown,
 	.hw_params = gbcodec_hw_params,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] staging: greybus: audio: constify snd_soc_dai_ops structures
  2017-08-21  4:58 [PATCH] staging: greybus: audio: constify snd_soc_dai_ops structures Arvind Yadav
@ 2017-08-21 15:30 ` Mark Greer
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Greer @ 2017-08-21 15:30 UTC (permalink / raw)
  To: Arvind Yadav
  Cc: vaibhav.sr, mgreer, johan, elder, gregkh, linux-kernel,
	greybus-dev, devel

On Mon, Aug 21, 2017 at 10:28:24AM +0530, Arvind Yadav wrote:
> snd_soc_dai_ops are not supposed to change at runtime. All functions
> working with snd_soc_dai_ops provided by <sound/soc-dai.h> work with
> const snd_soc_dai_ops. So mark the non-const structs as const.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
>  drivers/staging/greybus/audio_codec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c
> index 25c8bb4..a6d01f0 100644
> --- a/drivers/staging/greybus/audio_codec.c
> +++ b/drivers/staging/greybus/audio_codec.c
> @@ -674,7 +674,7 @@ static int gbcodec_mute_stream(struct snd_soc_dai *dai, int mute, int stream)
>  	return ret;
>  }
>  
> -static struct snd_soc_dai_ops gbcodec_dai_ops = {
> +static const struct snd_soc_dai_ops gbcodec_dai_ops = {
>  	.startup = gbcodec_startup,
>  	.shutdown = gbcodec_shutdown,
>  	.hw_params = gbcodec_hw_params,

Thanks Arvind.

Acked-by: Mark Greer <mgreer@animalcreek.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-21 15:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-21  4:58 [PATCH] staging: greybus: audio: constify snd_soc_dai_ops structures Arvind Yadav
2017-08-21 15:30 ` Mark Greer

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.