ASoC: soc-cache: Add reg_size as a member to snd_soc_codec

Simplify the use of reg_size, by calculating it once and storing it in
the codec structure for later reference.  The value of reg_size is
reg_cache_size * reg_word_size.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
Dimitris Papastamos
2011-01-12 10:38:58 +00:00
committed by Mark Brown
parent d779fce5d7
commit aea170a099
3 changed files with 10 additions and 18 deletions

View File

@@ -459,6 +459,7 @@ struct snd_soc_codec {
struct list_head card_list;
int num_dai;
enum snd_soc_compress_type compress_type;
size_t reg_size; /* reg_cache_size * reg_word_size */
/* runtime */
struct snd_ac97 *ac97; /* for ad-hoc ac97 devices */