From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Brown Subject: Re: [PATCH 06/10] ASoC: wm8940: Convert to snd_soc_cache_sync Date: Thu, 6 Oct 2011 14:18:12 +0100 Message-ID: <20111006131811.GA16404@opensource.wolfsonmicro.com> References: <1317881417.13399.1.camel@phoenix> <1317881863.13399.10.camel@phoenix> <4E8D90E9.5060208@cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <4E8D90E9.5060208@cam.ac.uk> Sender: linux-kernel-owner@vger.kernel.org To: Jonathan Cameron Cc: Axel Lin , linux-kernel@vger.kernel.org, Ian Lartey , Dimitris Papastamos , Liam Girdwood , alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org 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...).