ASoC: dapm: Constify lots of names that are never modified
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 17 Feb 2012 01:07:42 +0000 (17:07 -0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 17 Feb 2012 16:10:06 +0000 (08:10 -0800)
Neater and avoids warnings when used in other places where const strings
are desired.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
include/sound/soc-dapm.h
include/sound/soc.h
sound/soc/soc-core.c

index c32c52167b53cbebeb71aba094e97b8527bbabfa..91eb8126c00e8884b05bdfb1ce9118cc21715927 100644 (file)
@@ -445,8 +445,8 @@ struct snd_soc_dapm_route {
 
 /* dapm audio path between two widgets */
 struct snd_soc_dapm_path {
-       char *name;
-       char *long_name;
+       const char *name;
+       const char *long_name;
 
        /* source (input) and sink (output) widgets */
        struct snd_soc_dapm_widget *source;
@@ -469,8 +469,8 @@ struct snd_soc_dapm_path {
 /* dapm widget */
 struct snd_soc_dapm_widget {
        enum snd_soc_dapm_type id;
-       char *name;             /* widget name */
-       char *sname;    /* stream name */
+       const char *name;               /* widget name */
+       const char *sname;      /* stream name */
        struct snd_soc_codec *codec;
        struct snd_soc_platform *platform;
        struct list_head list;
index 8fa4dcaa096be7a412705d791958814e9e59b320..1e16d6e3f2a8c7211698b73a94b5b097df7ed44b 100644 (file)
@@ -366,7 +366,7 @@ void snd_soc_free_ac97_codec(struct snd_soc_codec *codec);
  *Controls
  */
 struct snd_kcontrol *snd_soc_cnew(const struct snd_kcontrol_new *_template,
-                                 void *data, char *long_name,
+                                 void *data, const char *long_name,
                                  const char *prefix);
 int snd_soc_add_codec_controls(struct snd_soc_codec *codec,
        const struct snd_kcontrol_new *controls, int num_controls);
index 7645b8a545cfebf7a89af589953cf5abadd0c592..77d230cba61a98834bf274584f08732f01dd9ca0 100644 (file)
@@ -2018,7 +2018,7 @@ EXPORT_SYMBOL_GPL(snd_soc_set_runtime_hwparams);
  * Returns 0 for success, else error.
  */
 struct snd_kcontrol *snd_soc_cnew(const struct snd_kcontrol_new *_template,
-                                 void *data, char *long_name,
+                                 void *data, const char *long_name,
                                  const char *prefix)
 {
        struct snd_kcontrol_new template;