diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2014-11-08 10:38:07 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-11-09 04:06:30 -0500 |
commit | 427d204c86e095bb91eb8af381bd90a48376a860 (patch) | |
tree | cad99da44af0b758fb5d8055317ac36872179354 /include/sound | |
parent | 6cc79294efefde2593eaf72effebc8b1cc71d5ac (diff) |
ASoC: Remove snd_soc_cache_sync() implementation
This function has no more non regmap user, which means we can remove the
implementation of the function and associated functions and structure
fields.
For convenience we keep a static inline version of the function that
forwards calls to regcache_sync() unconditionally.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/soc.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h index 7ba7130037a0..fadcb351f3e1 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -409,13 +409,9 @@ int devm_snd_soc_register_component(struct device *dev, | |||
409 | const struct snd_soc_component_driver *cmpnt_drv, | 409 | const struct snd_soc_component_driver *cmpnt_drv, |
410 | struct snd_soc_dai_driver *dai_drv, int num_dai); | 410 | struct snd_soc_dai_driver *dai_drv, int num_dai); |
411 | void snd_soc_unregister_component(struct device *dev); | 411 | void snd_soc_unregister_component(struct device *dev); |
412 | int snd_soc_cache_sync(struct snd_soc_codec *codec); | ||
413 | int snd_soc_cache_init(struct snd_soc_codec *codec); | 412 | int snd_soc_cache_init(struct snd_soc_codec *codec); |
414 | int snd_soc_cache_exit(struct snd_soc_codec *codec); | 413 | int snd_soc_cache_exit(struct snd_soc_codec *codec); |
415 | int snd_soc_cache_write(struct snd_soc_codec *codec, | 414 | |
416 | unsigned int reg, unsigned int value); | ||
417 | int snd_soc_cache_read(struct snd_soc_codec *codec, | ||
418 | unsigned int reg, unsigned int *value); | ||
419 | int snd_soc_platform_read(struct snd_soc_platform *platform, | 415 | int snd_soc_platform_read(struct snd_soc_platform *platform, |
420 | unsigned int reg); | 416 | unsigned int reg); |
421 | int snd_soc_platform_write(struct snd_soc_platform *platform, | 417 | int snd_soc_platform_write(struct snd_soc_platform *platform, |
@@ -791,13 +787,11 @@ struct snd_soc_codec { | |||
791 | unsigned int ac97_registered:1; /* Codec has been AC97 registered */ | 787 | unsigned int ac97_registered:1; /* Codec has been AC97 registered */ |
792 | unsigned int ac97_created:1; /* Codec has been created by SoC */ | 788 | unsigned int ac97_created:1; /* Codec has been created by SoC */ |
793 | unsigned int cache_init:1; /* codec cache has been initialized */ | 789 | unsigned int cache_init:1; /* codec cache has been initialized */ |
794 | u32 cache_sync; /* Cache needs to be synced to hardware */ | ||
795 | 790 | ||
796 | /* codec IO */ | 791 | /* codec IO */ |
797 | void *control_data; /* codec control (i2c/3wire) data */ | 792 | void *control_data; /* codec control (i2c/3wire) data */ |
798 | hw_write_t hw_write; | 793 | hw_write_t hw_write; |
799 | void *reg_cache; | 794 | void *reg_cache; |
800 | struct mutex cache_rw_mutex; | ||
801 | 795 | ||
802 | /* component */ | 796 | /* component */ |
803 | struct snd_soc_component component; | 797 | struct snd_soc_component component; |
@@ -1264,6 +1258,17 @@ unsigned int snd_soc_read(struct snd_soc_codec *codec, unsigned int reg); | |||
1264 | int snd_soc_write(struct snd_soc_codec *codec, unsigned int reg, | 1258 | int snd_soc_write(struct snd_soc_codec *codec, unsigned int reg, |
1265 | unsigned int val); | 1259 | unsigned int val); |
1266 | 1260 | ||
1261 | /** | ||
1262 | * snd_soc_cache_sync() - Sync the register cache with the hardware | ||
1263 | * @codec: CODEC to sync | ||
1264 | * | ||
1265 | * Note: This function will call regcache_sync() | ||
1266 | */ | ||
1267 | static inline int snd_soc_cache_sync(struct snd_soc_codec *codec) | ||
1268 | { | ||
1269 | return regcache_sync(codec->component.regmap); | ||
1270 | } | ||
1271 | |||
1267 | /* component IO */ | 1272 | /* component IO */ |
1268 | int snd_soc_component_read(struct snd_soc_component *component, | 1273 | int snd_soc_component_read(struct snd_soc_component *component, |
1269 | unsigned int reg, unsigned int *val); | 1274 | unsigned int reg, unsigned int *val); |