[alsa-devel] [PATCH 06/10] ASoC: wm8940: Convert to snd_soc_cache_sync

Mark Brown broonie at opensource.wolfsonmicro.com
Thu Oct 6 15:18:12 CEST 2011


On Thu, Oct 06, 2011 at 12:28:41PM +0100, Jonathan Cameron wrote:
> On 10/06/11 07:17, Axel Lin wrote:

> > +static int wm8940_volatile_register(struct snd_soc_codec *codec,
> > +				    unsigned int reg)
> > +{
> > +	switch (reg) {
> > +	case WM8940_SOFTRESET:
> > +		return 1;
> > +	default:
> > +		return 0;
> > +	}
> > +}

> I guess this makes sense from point of view of keeping things inline with
> more complex drivers.  Otherwise I'd expect to see something like:
> {
> 	return !!(reg == WM894_SOFTRESET);
> }

On the other hand we actually want people to be able to read the code
(though the !! there which is the major complication isn't actually
doing anything...).


More information about the Alsa-devel mailing list