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 <[email protected]>
Acked-by: Liam Girdwood <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
This commit is contained in:
Dimitris Papastamos 2011-01-12 10:38:58 +00:00 • committed by Mark Brown
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 */