Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754362AbdHUPbR (ORCPT ); Mon, 21 Aug 2017 11:31:17 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:42169 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754073AbdHUPaF (ORCPT ); Mon, 21 Aug 2017 11:30:05 -0400 X-ME-Sender: X-Sasl-enc: PIScUmkVV+Fg6Kct8rYcUuTHE2NVZ9Min2qJPU4pCMwS 1503329404 Date: Mon, 21 Aug 2017 08:30:03 -0700 From: Mark Greer To: Arvind Yadav 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 Message-ID: <20170821153003.GA4130@animalcreek.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Animal Creek Technologies, Inc. User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1055 Lines: 27 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 work with > const snd_soc_dai_ops. So mark the non-const structs as const. > > Signed-off-by: Arvind Yadav > --- > 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