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

Axel Lin axel.lin at gmail.com
Thu Oct 6 13:33:29 CEST 2011


>> +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);
> }

Either is ok to me.
But current syntax makes it easier to add more registers to be volatile
if necessary.

So I'll let Mark decide if I need to send a v2 for changing this.

Regards,
Axel


More information about the Alsa-devel mailing list