10 Jan
2011
10 Jan
'11
6:33 p.m.
Mark Brown wrote:
It's supposed to be 1 for change, 0 for no change or an error - if you look at the core functions you'll see that they generally all follow this idiom of using the return value from snd_soc_update_bits() directly.
Ok, so that all works then.
I found another issue. snd_soc_update_bits() breaks if snd_soc_read() returns a negative number, so I'll fix that. But why do the I/O functions in soc-cache.c do this:
static unsigned int snd_soc_16_16_read(struct snd_soc_codec *codec, unsigned int reg) { ... ret = snd_soc_cache_read(codec, reg, &val); if (ret < 0) return -1;
What's wrong with:
if (ret < 0) return ret;
--
Timur Tabi
Linux kernel developer at Freescale