lkml.org 
[lkml]   [2017]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] staging: greybus: audio: constify snd_soc_dai_ops structures
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>

\
 
 \ /
  Last update: 2017-08-21 17:32    [W:0.030 / U:1.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site