* [PATCH] ASoC: Fix reg_cache_size for stac9766
@ 2011-12-05 2:06 Axel Lin
2011-12-05 13:31 ` Mark Brown
0 siblings, 1 reply; 4+ messages in thread
From: Axel Lin @ 2011-12-05 2:06 UTC (permalink / raw)
To: alsa-devel; +Cc: Lars-Peter Clausen, Mark Brown, Liam Girdwood
reg_cache_size is supposed to be the number of elements in the register cache,
not the size in bytes.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
sound/soc/codecs/stac9766.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/soc/codecs/stac9766.c b/sound/soc/codecs/stac9766.c
index 5581953..da71615 100644
--- a/sound/soc/codecs/stac9766.c
+++ b/sound/soc/codecs/stac9766.c
@@ -380,7 +380,7 @@ static struct snd_soc_codec_driver soc_codec_dev_stac9766 = {
.remove = stac9766_codec_remove,
.suspend = stac9766_codec_suspend,
.resume = stac9766_codec_resume,
- .reg_cache_size = sizeof(stac9766_reg),
+ .reg_cache_size = ARRAY_SIZE(stac9766_reg),
.reg_word_size = sizeof(u16),
.reg_cache_step = 2,
.reg_cache_default = stac9766_reg,
--
1.7.5.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ASoC: Fix reg_cache_size for stac9766
2011-12-05 2:06 [PATCH] ASoC: Fix reg_cache_size for stac9766 Axel Lin
@ 2011-12-05 13:31 ` Mark Brown
2011-12-05 14:12 ` Axel Lin
0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2011-12-05 13:31 UTC (permalink / raw)
To: Axel Lin; +Cc: alsa-devel, Lars-Peter Clausen, Liam Girdwood
On Mon, Dec 05, 2011 at 10:06:04AM +0800, Axel Lin wrote:
> reg_cache_size is supposed to be the number of elements in the register cache,
> not the size in bytes.
Applied, though note that in this case as the register values are 8 bits
the two numbers are exactly the same so this is a coding style fix only
(but still useful!).
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ASoC: Fix reg_cache_size for stac9766
2011-12-05 13:31 ` Mark Brown
@ 2011-12-05 14:12 ` Axel Lin
2011-12-05 14:18 ` Mark Brown
0 siblings, 1 reply; 4+ messages in thread
From: Axel Lin @ 2011-12-05 14:12 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, Lars-Peter Clausen, Liam Girdwood
2011/12/5 Mark Brown <broonie@opensource.wolfsonmicro.com>:
> On Mon, Dec 05, 2011 at 10:06:04AM +0800, Axel Lin wrote:
>> reg_cache_size is supposed to be the number of elements in the register cache,
>> not the size in bytes.
>
> Applied, though note that in this case as the register values are 8 bits
> the two numbers are exactly the same so this is a coding style fix only
> (but still useful!).
Actually, the register values are 16 bits.
static const u16 stac9766_reg[] = {
Axel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ASoC: Fix reg_cache_size for stac9766
2011-12-05 14:12 ` Axel Lin
@ 2011-12-05 14:18 ` Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2011-12-05 14:18 UTC (permalink / raw)
To: Axel Lin; +Cc: alsa-devel, Lars-Peter Clausen, Liam Girdwood
On Mon, Dec 05, 2011 at 10:12:51PM +0800, Axel Lin wrote:
> Actually, the register values are 16 bits.
> static const u16 stac9766_reg[] = {
Oh dear, looked at the wrong sta... driver, sorry.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-12-05 14:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-05 2:06 [PATCH] ASoC: Fix reg_cache_size for stac9766 Axel Lin
2011-12-05 13:31 ` Mark Brown
2011-12-05 14:12 ` Axel Lin
2011-12-05 14:18 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).