From patchwork Fri Aug 18 12:25:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 110386 Delivered-To: patch@linaro.org Received: by 10.182.109.195 with SMTP id hu3csp764917obb; Fri, 18 Aug 2017 05:25:47 -0700 (PDT) X-Received: by 10.28.168.84 with SMTP id r81mr1478285wme.148.1503059147010; Fri, 18 Aug 2017 05:25:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503059147; cv=none; d=google.com; s=arc-20160816; b=AL9eyz2ySUzGteYpLNUS7Vfj5Yxr2KGIc/qtdphRwanhTNsGmLVoGTMbp2BALI6AXk 7pluQTfVOQdT34FDgLod8XAH7qW1GLo12L/NkteW+oHTjnKl9PmfL8k4BO8HnOG3E4Pg KzAqxg/I5DwV2MuV+a8M+/SWi7ALF/N0/kpvNbq1XDM31Xm+aj8Ra9usN/7okWit5Nfp Oi0jevmIqWRhZs4djjVVBs5WhkRJ+gIRYhd07cgFFmltJM8sCx2lNqCGbOuOUBsLCpAc mWcOB5PIzyMBUxAsKsfNuJxE7ciRBzTQ6cOJ7P60B5LfFMKwHmt2jPkTF4yFVtHz3V78 wFDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:date:message-id:in-reply-to:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=xJrZGTs4wPUzQxyH2fOeitsYVvZ+uhh0gNUzKpbAyqY=; b=Bfo6wTM+3NQ6VLm4MxJHAGUKZRO6QxZc5wiJcT7zX34KObW2Sltr59JOzjN1BJEZeg orGlaot7hzSvnaYstIVoXc7TzuFJYDFJyMuHlMT5MEGUQyzpPu8zevkDZQdxqEHHCHLD tiUBmJL894zG0beDiCVFt1trI8QV44K/saZqmaL2HdgmzgX2KD4F2IEEapZeJZqOivvA KWxfF9Af82q/d+MOhYuHnLNN9gMFC4avHS4e1wAQM2HbZW58KBTzmbzLzZD5AbQQEZ1g q8Ch7TB0cSFXaenAOVVudmhIXIcbAal79XJrslrZ7K1J8WDiWTX68eQxwwQ/qvNtVa+w mLHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=cO8NKXoq; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id f18si4186916wrc.302.2017.08.18.05.25.46; Fri, 18 Aug 2017 05:25:46 -0700 (PDT) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=cO8NKXoq; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 27C912677F5; Fri, 18 Aug 2017 14:25:45 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 2FF4C26780C; Fri, 18 Aug 2017 14:25:44 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, RP_MATCHES_RCVD, SPF_PASS autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id 2269D2677D2 for ; Fri, 18 Aug 2017 14:25:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=BRPM3a9gKB5aqeIms6KZedPkj2CTI52nddx9qIVuBsU=; b=cO8NKXoqb6R6 +hIc/++ZWiVkx+E7seomA6NFHp0F4/1Tfiyv12mccRDevJ4u7P25iNGTNkXZBTIzJOOdM7sq+R76D EPpcAD62ZUlahPpOrpvnwQM9IxM2JNibm8SdahtQ/dg2QWY8AQATXiyl81YzHb7jj+DwOIn4ca/+K R7mSQ=; Received: from [2001:470:1f1d:6b5:7e7a:91ff:fede:4a45] (helo=finisterre) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1digLN-0001af-FL; Fri, 18 Aug 2017 12:25:41 +0000 Received: from broonie by finisterre with local (Exim 4.89) (envelope-from ) id 1digLN-0002p0-0E; Fri, 18 Aug 2017 13:25:41 +0100 From: Mark Brown To: Arvind Yadav In-Reply-To: Message-Id: Date: Fri, 18 Aug 2017 13:25:41 +0100 Cc: alsa-devel@alsa-project.org, Mark Brown Subject: [alsa-devel] Applied "ASoC: codecs: constify snd_soc_dai_ops structures" to the asoc tree X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org The patch ASoC: codecs: constify snd_soc_dai_ops structures has been applied to the asoc tree at git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From eb59d73cb535ba32df928f210fb9a8529bf465c0 Mon Sep 17 00:00:00 2001 From: Arvind Yadav Date: Fri, 18 Aug 2017 17:35:59 +0530 Subject: [PATCH] ASoC: codecs: constify snd_soc_dai_ops structures 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 Signed-off-by: Mark Brown --- sound/soc/codecs/cs42l42.c | 2 +- sound/soc/codecs/es8316.c | 2 +- sound/soc/codecs/inno_rk3036.c | 2 +- sound/soc/codecs/max9867.c | 2 +- sound/soc/codecs/max98926.c | 2 +- sound/soc/codecs/msm8916-wcd-analog.c | 2 +- sound/soc/codecs/rt5616.c | 2 +- sound/soc/codecs/rt5663.c | 2 +- sound/soc/codecs/tas5720.c | 2 +- sound/soc/codecs/zx_aud96p22.c | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) -- 2.13.2 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/codecs/cs42l42.c b/sound/soc/codecs/cs42l42.c index 55e4520cdcaf..9e860dfa0163 100644 --- a/sound/soc/codecs/cs42l42.c +++ b/sound/soc/codecs/cs42l42.c @@ -911,7 +911,7 @@ static int cs42l42_digital_mute(struct snd_soc_dai *dai, int mute) SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops cs42l42_ops = { +static const struct snd_soc_dai_ops cs42l42_ops = { .hw_params = cs42l42_pcm_hw_params, .set_fmt = cs42l42_set_dai_fmt, .set_sysclk = cs42l42_set_sysclk, diff --git a/sound/soc/codecs/es8316.c b/sound/soc/codecs/es8316.c index 4f35af6a5d3a..da2d353af5ba 100644 --- a/sound/soc/codecs/es8316.c +++ b/sound/soc/codecs/es8316.c @@ -502,7 +502,7 @@ static int es8316_mute(struct snd_soc_dai *dai, int mute) #define ES8316_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ SNDRV_PCM_FMTBIT_S24_LE) -static struct snd_soc_dai_ops es8316_ops = { +static const struct snd_soc_dai_ops es8316_ops = { .startup = es8316_pcm_startup, .hw_params = es8316_pcm_hw_params, .set_fmt = es8316_set_dai_fmt, diff --git a/sound/soc/codecs/inno_rk3036.c b/sound/soc/codecs/inno_rk3036.c index 64b0be94bea3..6b59b6f08298 100644 --- a/sound/soc/codecs/inno_rk3036.c +++ b/sound/soc/codecs/inno_rk3036.c @@ -310,7 +310,7 @@ static int rk3036_codec_dai_hw_params(struct snd_pcm_substream *substream, SNDRV_PCM_FMTBIT_S24_LE | \ SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops rk3036_codec_dai_ops = { +static const struct snd_soc_dai_ops rk3036_codec_dai_ops = { .set_fmt = rk3036_codec_dai_set_fmt, .hw_params = rk3036_codec_dai_hw_params, }; diff --git a/sound/soc/codecs/max9867.c b/sound/soc/codecs/max9867.c index 6c0c0d6e8f3c..2f60924fe919 100644 --- a/sound/soc/codecs/max9867.c +++ b/sound/soc/codecs/max9867.c @@ -350,7 +350,7 @@ static int max9867_dai_set_fmt(struct snd_soc_dai *codec_dai, return 0; } -static struct snd_soc_dai_ops max9867_dai_ops = { +static const struct snd_soc_dai_ops max9867_dai_ops = { .set_fmt = max9867_dai_set_fmt, .set_sysclk = max9867_set_dai_sysclk, .prepare = max9867_prepare, diff --git a/sound/soc/codecs/max98926.c b/sound/soc/codecs/max98926.c index 7a39bfb9e0f9..59d03d036945 100644 --- a/sound/soc/codecs/max98926.c +++ b/sound/soc/codecs/max98926.c @@ -459,7 +459,7 @@ static int max98926_dai_hw_params(struct snd_pcm_substream *substream, #define MAX98926_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops max98926_dai_ops = { +static const struct snd_soc_dai_ops max98926_dai_ops = { .set_fmt = max98926_dai_set_fmt, .hw_params = max98926_dai_hw_params, }; diff --git a/sound/soc/codecs/msm8916-wcd-analog.c b/sound/soc/codecs/msm8916-wcd-analog.c index 4cc52cecf3b7..f07674eddc52 100644 --- a/sound/soc/codecs/msm8916-wcd-analog.c +++ b/sound/soc/codecs/msm8916-wcd-analog.c @@ -753,7 +753,7 @@ static void pm8916_wcd_analog_shutdown(struct snd_pcm_substream *substream, RST_CTL_DIG_SW_RST_N_MASK, 0); } -static struct snd_soc_dai_ops pm8916_wcd_analog_dai_ops = { +static const struct snd_soc_dai_ops pm8916_wcd_analog_dai_ops = { .startup = pm8916_wcd_analog_startup, .shutdown = pm8916_wcd_analog_shutdown, }; diff --git a/sound/soc/codecs/rt5616.c b/sound/soc/codecs/rt5616.c index 3c5f555ae6d0..c94e94fe8297 100644 --- a/sound/soc/codecs/rt5616.c +++ b/sound/soc/codecs/rt5616.c @@ -1265,7 +1265,7 @@ static int rt5616_resume(struct snd_soc_codec *codec) #define RT5616_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8) -static struct snd_soc_dai_ops rt5616_aif_dai_ops = { +static const struct snd_soc_dai_ops rt5616_aif_dai_ops = { .hw_params = rt5616_hw_params, .set_fmt = rt5616_set_dai_fmt, .set_sysclk = rt5616_set_dai_sysclk, diff --git a/sound/soc/codecs/rt5663.c b/sound/soc/codecs/rt5663.c index ebc5e3b2b62b..1bbe36338cd3 100644 --- a/sound/soc/codecs/rt5663.c +++ b/sound/soc/codecs/rt5663.c @@ -2860,7 +2860,7 @@ static int rt5663_resume(struct snd_soc_codec *codec) #define RT5663_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8) -static struct snd_soc_dai_ops rt5663_aif_dai_ops = { +static const struct snd_soc_dai_ops rt5663_aif_dai_ops = { .hw_params = rt5663_hw_params, .set_fmt = rt5663_set_dai_fmt, .set_sysclk = rt5663_set_dai_sysclk, diff --git a/sound/soc/codecs/tas5720.c b/sound/soc/codecs/tas5720.c index d14b78b1917b..a736a2a6976c 100644 --- a/sound/soc/codecs/tas5720.c +++ b/sound/soc/codecs/tas5720.c @@ -507,7 +507,7 @@ static const struct snd_soc_codec_driver soc_codec_dev_tas5720 = { #define TAS5720_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S18_3LE |\ SNDRV_PCM_FMTBIT_S20_3LE | SNDRV_PCM_FMTBIT_S24_LE) -static struct snd_soc_dai_ops tas5720_speaker_dai_ops = { +static const struct snd_soc_dai_ops tas5720_speaker_dai_ops = { .hw_params = tas5720_hw_params, .set_fmt = tas5720_set_dai_fmt, .set_tdm_slot = tas5720_set_dai_tdm_slot, diff --git a/sound/soc/codecs/zx_aud96p22.c b/sound/soc/codecs/zx_aud96p22.c index 36d0a7087a54..51fad48892d3 100644 --- a/sound/soc/codecs/zx_aud96p22.c +++ b/sound/soc/codecs/zx_aud96p22.c @@ -312,7 +312,7 @@ static int aud96p22_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) return 0; } -static struct snd_soc_dai_ops aud96p22_dai_ops = { +static const struct snd_soc_dai_ops aud96p22_dai_ops = { .set_fmt = aud96p22_set_fmt, };