From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964915Ab1JFN1W (ORCPT ); Thu, 6 Oct 2011 09:27:22 -0400 Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150]:40697 "EHLO ppsw-50.csi.cam.ac.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964892Ab1JFN1V (ORCPT ); Thu, 6 Oct 2011 09:27:21 -0400 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: not scanned X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Message-ID: <4E8DAEB4.9090601@cam.ac.uk> Date: Thu, 06 Oct 2011 14:35:48 +0100 From: Jonathan Cameron User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20111003 Thunderbird/7.0.1 MIME-Version: 1.0 To: Mark Brown CC: Axel Lin , linux-kernel@vger.kernel.org, Ian Lartey , Dimitris Papastamos , Liam Girdwood , alsa-devel@alsa-project.org Subject: Re: [PATCH 06/10] ASoC: wm8940: Convert to snd_soc_cache_sync References: <1317881417.13399.1.camel@phoenix> <1317881863.13399.10.camel@phoenix> <4E8D90E9.5060208@cam.ac.uk> <20111006131811.GA16404@opensource.wolfsonmicro.com> In-Reply-To: <20111006131811.GA16404@opensource.wolfsonmicro.com> X-Enigmail-Version: 1.4a1pre Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/06/11 14:18, Mark Brown wrote: > 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...). Fair point.