Date:2013-03-27 12:02:22 (9 years 6 months ago)
Author:Lars C.
Commit:6392060c44136538b15c53667662ee7107dcb0f8
Message:ASoC: Constify the 'driver' field of snd_soc_platform

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>
Files: include/sound/soc.h (2 diffs)
sound/soc/soc-core.c (1 diff)

Change Details

include/sound/soc.h
371371int snd_soc_resume(struct device *dev);
372372int snd_soc_poweroff(struct device *dev);
373373int snd_soc_register_platform(struct device *dev,
374        struct snd_soc_platform_driver *platform_drv);
374        const struct snd_soc_platform_driver *platform_drv);
375375void snd_soc_unregister_platform(struct device *dev);
376376int snd_soc_register_codec(struct device *dev,
377377        const struct snd_soc_codec_driver *codec_drv,
...... 
823823    const char *name;
824824    int id;
825825    struct device *dev;
826    struct snd_soc_platform_driver *driver;
826    const struct snd_soc_platform_driver *driver;
827827    struct mutex mutex;
828828
829829    unsigned int suspended:1; /* platform is suspended */
sound/soc/soc-core.c
39083908 * @platform: platform to register
39093909 */
39103910int snd_soc_register_platform(struct device *dev,
3911        struct snd_soc_platform_driver *platform_drv)
3911        const struct snd_soc_platform_driver *platform_drv)
39123912{
39133913    struct snd_soc_platform *platform;
39143914

Archive Download the corresponding diff file



interactive