]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ASoC: Constify the 'driver' field of snd_soc_platform
authorLars-Peter Clausen <lars@metafoo.de>
Wed, 27 Mar 2013 11:02:22 +0000 (12:02 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 27 Mar 2013 23:08:35 +0000 (23:08 +0000)
The ASoC core does no not modify the driver of a platform. Making it const
allows ASoC platform drivers to declare the snd_soc_platform_driver struct as
const.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
include/sound/soc.h
sound/soc/soc-core.c

index c84062b22221f65bcf7b1bf45830868c64e5c391..5fb70d1e8cce5b7de575f1b3a93940939d6f68b9 100644 (file)
@@ -371,7 +371,7 @@ int snd_soc_suspend(struct device *dev);
 int snd_soc_resume(struct device *dev);
 int snd_soc_poweroff(struct device *dev);
 int snd_soc_register_platform(struct device *dev,
-               struct snd_soc_platform_driver *platform_drv);
+               const struct snd_soc_platform_driver *platform_drv);
 void snd_soc_unregister_platform(struct device *dev);
 int snd_soc_register_codec(struct device *dev,
                const struct snd_soc_codec_driver *codec_drv,
@@ -823,7 +823,7 @@ struct snd_soc_platform {
        const char *name;
        int id;
        struct device *dev;
-       struct snd_soc_platform_driver *driver;
+       const struct snd_soc_platform_driver *driver;
        struct mutex mutex;
 
        unsigned int suspended:1; /* platform is suspended */
index 0ce075c47b2518855ec67b66042f3df857b1dfbd..4d24b5ea3ba7542cce8282e84d32de8506c6b2d9 100644 (file)
@@ -3906,7 +3906,7 @@ EXPORT_SYMBOL_GPL(snd_soc_unregister_dais);
  * @platform: platform to register
  */
 int snd_soc_register_platform(struct device *dev,
-               struct snd_soc_platform_driver *platform_drv)
+               const struct snd_soc_platform_driver *platform_drv)
 {
        struct snd_soc_platform *platform;