From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752741AbcFCMCB (ORCPT ); Fri, 3 Jun 2016 08:02:01 -0400 Received: from saturn.retrosnub.co.uk ([178.18.118.26]:32877 "EHLO saturn.retrosnub.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751675AbcFCMCA (ORCPT ); Fri, 3 Jun 2016 08:02:00 -0400 Subject: Re: [PATCH v2 3/7] iio: adc: ad7793: claim direct mode when writing frequency To: Lars-Peter Clausen , Alison Schofield References: <20160602042802.GA2910@d830.WORKGROUP> <574FF039.9040909@metafoo.de> Cc: Michael.Hennerich@analog.com, knaack.h@gmx.de, pmeerw@pmeerw.net, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org From: Jonathan Cameron Message-ID: <797b141b-a1f5-9540-0bd0-bed17ef583d9@kernel.org> Date: Fri, 3 Jun 2016 13:01:57 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <574FF039.9040909@metafoo.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/06/16 09:37, Lars-Peter Clausen wrote: > On 06/02/2016 06:28 AM, Alison Schofield wrote: >> Driver was checking for direct mode and trying to lock it, but >> left a gap where mode could change before the desired operation. >> Use iio_device_claim_direct_mode() to guarantee device stays in >> direct mode. >> >> Refactor function to clarify look-up followed by lock sequence. >> >> Signed-off-by: Alison Schofield >> Cc: Daniel Baluta > > Looks good, thanks. > > Acked-by: Lars-Peter Clausen Applied to the togreg branch of iio.git - initially pushed out as testing for the autobuilders to play with it. Thanks, Jonathan > -- > To unsubscribe from this list: send the line "unsubscribe linux-iio" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >