linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bhumika Goyal <bhumirks@gmail.com>
To: julia.lawall@lip6.fr, lgirdwood@gmail.com, broonie@kernel.org,
	perex@perex.cz, tiwai@suse.com, maxime.ripard@free-electrons.com,
	wens@csie.org, alsa-devel@alsa-project.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, lars@metafoo.de,
	brian.austin@cirrus.com, Paul.Handrigan@cirrus.com,
	support.opensource@diasemi.com, mr.swami.reddy@ti.com,
	vishwas.a.deshpande@ti.com, peda@axentia.se,
	bardliao@realtek.com, baohua@kernel.org, peter.ujfalusi@ti.com,
	patches@opensource.cirrus.com
Cc: Bhumika Goyal <bhumirks@gmail.com>
Subject: [PATCH 2/2] ASoC: sunxi: make snd_soc_codec_driver structures as const
Date: Thu,  3 Aug 2017 21:30:20 +0530	[thread overview]
Message-ID: <1501776020-3328-3-git-send-email-bhumirks@gmail.com> (raw)
In-Reply-To: <1501776020-3328-1-git-send-email-bhumirks@gmail.com>

Declare snd_soc_codec_driver structures as const as they are either
passed as an argument to the function snd_soc_register_codec or stored as
reference in field codec of type sun4i_codec_quirks. Both the fucntion
argument and the codec field are of type const, so declare the
structures with this property as const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 sound/soc/sunxi/sun4i-codec.c | 6 +++---
 sound/soc/sunxi/sun8i-codec.c | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c
index 73d054f..c668b8b 100644
--- a/sound/soc/sunxi/sun4i-codec.c
+++ b/sound/soc/sunxi/sun4i-codec.c
@@ -762,7 +762,7 @@ static void sun4i_codec_shutdown(struct snd_pcm_substream *substream,
 	{ "Mic1", NULL, "VMIC" },
 };
 
-static struct snd_soc_codec_driver sun4i_codec_codec = {
+static const struct snd_soc_codec_driver sun4i_codec_codec = {
 	.component_driver = {
 		.controls		= sun4i_codec_controls,
 		.num_controls		= ARRAY_SIZE(sun4i_codec_controls),
@@ -1068,7 +1068,7 @@ static const DECLARE_TLV_DB_RANGE(sun6i_codec_mic_gain_scale,
 	{ "Right ADC", NULL, "Right ADC Mixer" },
 };
 
-static struct snd_soc_codec_driver sun6i_codec_codec = {
+static const struct snd_soc_codec_driver sun6i_codec_codec = {
 	.component_driver = {
 		.controls		= sun6i_codec_codec_widgets,
 		.num_controls		= ARRAY_SIZE(sun6i_codec_codec_widgets),
@@ -1096,7 +1096,7 @@ static const DECLARE_TLV_DB_RANGE(sun6i_codec_mic_gain_scale,
 
 };
 
-static struct snd_soc_codec_driver sun8i_a23_codec_codec = {
+static const struct snd_soc_codec_driver sun8i_a23_codec_codec = {
 	.component_driver = {
 		.controls		= sun8i_a23_codec_codec_controls,
 		.num_controls		= ARRAY_SIZE(sun8i_a23_codec_codec_controls),
diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index 253ae0b..abfb710 100644
--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -360,7 +360,7 @@ static int sun8i_codec_hw_params(struct snd_pcm_substream *substream,
 	.ops = &sun8i_codec_dai_ops,
 };
 
-static struct snd_soc_codec_driver sun8i_soc_codec = {
+static const struct snd_soc_codec_driver sun8i_soc_codec = {
 	.component_driver = {
 		.dapm_widgets		= sun8i_codec_dapm_widgets,
 		.num_dapm_widgets	= ARRAY_SIZE(sun8i_codec_dapm_widgets),
-- 
1.9.1

  parent reply	other threads:[~2017-08-03 16:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-03 16:00 [PATCH 0/2] ASoC: make snd_soc_codec_driver structures const Bhumika Goyal
2017-08-03 16:00 ` [PATCH 1/2] ASoC: codecs: add const to snd_soc_codec_driver structures Bhumika Goyal
2017-08-10 15:20   ` Mark Brown
2017-08-10 15:26     ` Bhumika Goyal
2017-08-10 15:31       ` Mark Brown
2017-08-10 15:42   ` Applied "ASoC: codecs: add const to snd_soc_codec_driver structures" to the asoc tree Mark Brown
2017-08-03 16:00 ` Bhumika Goyal [this message]
2017-08-07 11:52   ` Applied "ASoC: sunxi: make snd_soc_codec_driver structures as const" " Mark Brown

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=1501776020-3328-3-git-send-email-bhumirks@gmail.com \
    --to=bhumirks@gmail.com \
    --cc=Paul.Handrigan@cirrus.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=baohua@kernel.org \
    --cc=bardliao@realtek.com \
    --cc=brian.austin@cirrus.com \
    --cc=broonie@kernel.org \
    --cc=julia.lawall@lip6.fr \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime.ripard@free-electrons.com \
    --cc=mr.swami.reddy@ti.com \
    --cc=patches@opensource.cirrus.com \
    --cc=peda@axentia.se \
    --cc=perex@perex.cz \
    --cc=peter.ujfalusi@ti.com \
    --cc=support.opensource@diasemi.com \
    --cc=tiwai@suse.com \
    --cc=vishwas.a.deshpande@ti.com \
    --cc=wens@csie.org \
    /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).