Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1203696yba; Sun, 14 Apr 2019 03:36:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqz53fy4Glx+DRps+2AddC5h8gtgwOYKG5dsTwZy3DCTuGdnyU+YCVAZa/OuZBwa+E9MCtTU X-Received: by 2002:a63:465b:: with SMTP id v27mr65061623pgk.165.1555238210909; Sun, 14 Apr 2019 03:36:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555238210; cv=none; d=google.com; s=arc-20160816; b=UI5917aED8A+KHRtMpyBAgPr9WgKhMpNgVK0IONTce1BD6C3BEYCwhiC4lBRKyrBL9 CL4z+DYNzR08E6ZsyDaknVde9CjV2ZYKbwzNCoOCPcO0vGM96fXgOYV3I3Q6V/fOb37N NXIEfkpahL7pzzLdNh9NJ04AlI+x4OdnYk0ly6BhcfcifaEiozXaz5KBeEbgdkYjCnW4 tAfxWxHTiOUQzoV0xOJQdgjiBQWuuKSFsq7KoRnM6RXxf9uyK4kwZ8I0OyE+irQBcSk7 uPf1rJtul45i/2z4YNsLekyoS75kvQpO2OD2JnSsxBgvxjSoIo+X/py0PrcZUhH6Mbo7 Eq+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=ZT37AD14SS613TqEgw39EQWkPfJibLxnS4kfQW78BEc=; b=QplVSwWjMisq+QDcUbAC8owpaxjr/yk6X8WWWbZYpUj7VXwlRzjGdsaj2Y6cJgfZLc oV0FTyRxmPswczHaofG2+QQ5f77BUm/F2tDUHnV2pdEw0yZ+6dnfqEipSAsWqYHq2s/n HYMez+AiY3sNansPM0l0juF5I2Pn9zWFQkR32usmXoZiU0DGyk0UDSNNF7g1Pn3Fg/r1 pmAABGiSDdwOg2VW+XZ6QL6/Witz0rl4Voifz1eI9hoVXVM2CNW4Na/ekAwvxKNHbOJv DfWyYI/tbxRy4npKbHWwMgqNnvKGoGXgOQ1dxKho/tC3OR6qrMvixsPdI1XB7FTRDyw6 i8kw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o2si41692115pgv.144.2019.04.14.03.36.34; Sun, 14 Apr 2019 03:36:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726988AbfDNKfq (ORCPT + 99 others); Sun, 14 Apr 2019 06:35:46 -0400 Received: from saturn.retrosnub.co.uk ([46.235.226.198]:45440 "EHLO saturn.retrosnub.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725807AbfDNKfq (ORCPT ); Sun, 14 Apr 2019 06:35:46 -0400 Received: from archlinux (cpc91196-cmbg18-2-0-cust659.5-4.cable.virginm.net [81.96.234.148]) by saturn.retrosnub.co.uk (Postfix; Retrosnub mail submission) with ESMTPSA id 263219E74F4; Sun, 14 Apr 2019 11:35:44 +0100 (BST) Date: Sun, 14 Apr 2019 11:35:42 +0100 From: Jonathan Cameron To: Artur Rojek Cc: Sebastian Reichel , Rob Herring , Mark Rutland , linux-pm@vger.kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Cercueil Subject: Re: [PATCH v2 2/4] iio: inkern: Convert iio_read_avail_channel_raw into a wrapper Message-ID: <20190414113542.27e1831f@archlinux> In-Reply-To: <20190324152750.43edf737@archlinux> References: <20190323172809.14407-1-contact@artur-rojek.eu> <20190323172809.14407-2-contact@artur-rojek.eu> <20190324152750.43edf737@archlinux> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 24 Mar 2019 15:27:50 +0000 Jonathan Cameron wrote: > On Sat, 23 Mar 2019 18:28:07 +0100 > Artur Rojek wrote: > > > Convert "iio_read_avail_channel_raw" over to a wrapper around > > "iio_read_avail_channel_attribute". > > > > With the introduction of "iio_read_avail_channel_attribute", > > the necessity of having a separate call to read raw channel values > > became redundant. > > > > Signed-off-by: Artur Rojek > Acked-by: Jonathan Cameron Applied to the ib-jz47xx-battery-prereq branch of iio.git Thanks, Jonathan > > > --- > > > > Changes: > > > > v2: new patch > > > > drivers/iio/inkern.c | 12 ++---------- > > 1 file changed, 2 insertions(+), 10 deletions(-) > > > > diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c > > index f19dbde3c945..4a5eff3f18bc 100644 > > --- a/drivers/iio/inkern.c > > +++ b/drivers/iio/inkern.c > > @@ -759,16 +759,8 @@ int iio_read_avail_channel_raw(struct iio_channel *chan, > > int ret; > > int type; > > > > - mutex_lock(&chan->indio_dev->info_exist_lock); > > - if (!chan->indio_dev->info) { > > - ret = -ENODEV; > > - goto err_unlock; > > - } > > - > > - ret = iio_channel_read_avail(chan, > > - vals, &type, length, IIO_CHAN_INFO_RAW); > > -err_unlock: > > - mutex_unlock(&chan->indio_dev->info_exist_lock); > > + ret = iio_read_avail_channel_attribute(chan, vals, &type, length, > > + IIO_CHAN_INFO_RAW); > > > > if (ret >= 0 && type != IIO_VAL_INT) > > /* raw values are assumed to be IIO_VAL_INT */ >