diff mbox

[004/102] ASoC: Add const to SOC_ENUM_*_DECL() macros

Message ID 1392723148-12597-2-git-send-email-tiwai@suse.de (mailing list archive)
State Accepted
Commit 2e7e1993f992b16342b3799de2f9572b2e53d53b
Delegated to: Mark Brown
Headers show

Commit Message

Takashi Iwai Feb. 18, 2014, 11:32 a.m. UTC
Since these macros are supposed to be used for decalring const
objects, let's add the const modifier there.

The doubled const appearing in usages will be cleaned by later
patches.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/soc.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Mark Brown Feb. 20, 2014, 1:55 a.m. UTC | #1
On Tue, Feb 18, 2014 at 12:32:16PM +0100, Takashi Iwai wrote:
> Since these macros are supposed to be used for decalring const
> objects, let's add the const modifier there.

Applied, thanks.
diff mbox

Patch

diff --git a/include/sound/soc.h b/include/sound/soc.h
index a53edc25334d..cc891387e7ac 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -286,14 +286,14 @@ 
  * ARRAY_SIZE internally
  */
 #define SOC_ENUM_DOUBLE_DECL(name, xreg, xshift_l, xshift_r, xtexts) \
-	struct soc_enum name = SOC_ENUM_DOUBLE(xreg, xshift_l, xshift_r, \
+	const struct soc_enum name = SOC_ENUM_DOUBLE(xreg, xshift_l, xshift_r, \
 						ARRAY_SIZE(xtexts), xtexts)
 #define SOC_ENUM_SINGLE_DECL(name, xreg, xshift, xtexts) \
 	SOC_ENUM_DOUBLE_DECL(name, xreg, xshift, xshift, xtexts)
 #define SOC_ENUM_SINGLE_EXT_DECL(name, xtexts) \
-	struct soc_enum name = SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(xtexts), xtexts)
+	const struct soc_enum name = SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(xtexts), xtexts)
 #define SOC_VALUE_ENUM_DOUBLE_DECL(name, xreg, xshift_l, xshift_r, xmask, xtexts, xvalues) \
-	struct soc_enum name = SOC_VALUE_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, \
+	const struct soc_enum name = SOC_VALUE_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, \
 							ARRAY_SIZE(xtexts), xtexts, xvalues)
 #define SOC_VALUE_ENUM_SINGLE_DECL(name, xreg, xshift, xmask, xtexts, xvalues) \
 	SOC_VALUE_ENUM_DOUBLE_DECL(name, xreg, xshift, xshift, xmask, xtexts, xvalues)