linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Greer <mgreer@animalcreek.com>
To: Arvind Yadav <arvind.yadav.cs@gmail.com>
Cc: vaibhav.sr@gmail.com, mgreer@animalcreek.com, johan@kernel.org,
	elder@kernel.org, gregkh@linuxfoundation.org,
	linux-kernel@vger.kernel.org, greybus-dev@lists.linaro.org,
	devel@driverdev.osuosl.org
Subject: Re: [PATCH] staging: greybus: audio: constify snd_soc_dai_ops structures
Date: Mon, 21 Aug 2017 08:30:03 -0700	[thread overview]
Message-ID: <20170821153003.GA4130@animalcreek.com> (raw)
In-Reply-To: <b68f19a4b69ca87e27f863f5c72cf04a39ee1b2c.1503291306.git.arvind.yadav.cs@gmail.com>

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>

      reply	other threads:[~2017-08-21 15:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170821153003.GA4130@animalcreek.com \
    --to=mgreer@animalcreek.com \
    --cc=arvind.yadav.cs@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=elder@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=greybus-dev@lists.linaro.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vaibhav.sr@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).