Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3351411ybl; Sun, 15 Dec 2019 08:02:11 -0800 (PST) X-Google-Smtp-Source: APXvYqw05OnVT+TndfBx5iXFY1j42itRbWcl/Ia18+HJGRHMU/L4PXVHUW/aGMevdvKSyppkFgX5 X-Received: by 2002:a05:6830:154c:: with SMTP id l12mr26924318otp.275.1576425731626; Sun, 15 Dec 2019 08:02:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576425731; cv=none; d=google.com; s=arc-20160816; b=QFPQaNKVeHou/OxZCgwzDLoZFTcbHE73SvpoiqTwMnOGKECG7osms4ebfLyTlGkFCK /60pMGL5TTY5G/U+q7gS6obxyKaT6Wc5a58flvF2t0TuqZ/5DSyZKSGfsU0PmAYfMyM2 YjEp5dX1IFz3G8C1aFcoStI0FOlA8K/lThV07FI4+dxiiL4yn9RYu2JZbmHZbAWlT+ZN s65RLMHT3o/vNFrVF7TCXlZW9TwXxe/oF9WlbW9m5/Y/3tjPcHWmgBg9hGGGJ3WvXVmt QA6sWNRsHmltJKLR6EOr6YId9pqjIPkwxA5s5yVEPDim6DGk4sM4IZx8lcwyx9G9KqJ1 4UaQ== 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=hKtWCsMbL6UBNDRvi6RAC1XFQNS5ky3VFxCgA3VEsKg=; b=tIafDr6sL5whuvGVT7w+XJZ7fIqg9yF8j65wQeTYr7KrwJYu9QT9l/c0b60Jy+IZ4K I1tC0+s9XCcCkKU/Q54v/EZpFCKEvhuMInnsmAxfv2Xw5FdsgFnXQffYpR5x01jEGRmB dcgCuK6Ps85l/dgy8OdKeijRxdZNotZ16jZ1Wh9MD/ZrlqEGv0JkUMIaMYn5kwtEs7+K NYtzfHHZhQOi9Zj7lpvceT9dKJBhn07ttMZvRWw/Igx6NsRozUmfPIQR/ipcQTqYQ7up Fcw6fhggxMAIQ/bgdAFh//1ZSC9kg/D4S+clqJJ0wOoHGfUoTh64meOUuUXoNkOTravZ A0jw== 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 l5si11222946otb.26.2019.12.15.08.02.00; Sun, 15 Dec 2019 08:02:11 -0800 (PST) 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 S1726744AbfLOQBV (ORCPT + 99 others); Sun, 15 Dec 2019 11:01:21 -0500 Received: from saturn.retrosnub.co.uk ([46.235.226.198]:44500 "EHLO saturn.retrosnub.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726504AbfLOQBU (ORCPT ); Sun, 15 Dec 2019 11:01:20 -0500 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) by saturn.retrosnub.co.uk (Postfix; Retrosnub mail submission) with ESMTPSA id B153B9E7D76; Sun, 15 Dec 2019 15:53:30 +0000 (GMT) Date: Sun, 15 Dec 2019 15:53:29 +0000 From: Jonathan Cameron To: Sasha Levin Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Alexandru Ardelean , Matt Ranostay , Jonathan Cameron , linux-iio@vger.kernel.org Subject: Re: [PATCH AUTOSEL 5.4 105/350] iio: chemical: atlas-ph-sensor: fix iio_triggered_buffer_predisable() position Message-ID: <20191215155329.4c71ad53@archlinux> In-Reply-To: <20191210210735.9077-66-sashal@kernel.org> References: <20191210210735.9077-1-sashal@kernel.org> <20191210210735.9077-66-sashal@kernel.org> X-Mailer: Claws Mail 3.17.4 (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 Tue, 10 Dec 2019 16:03:30 -0500 Sasha Levin wrote: > From: Alexandru Ardelean > > [ Upstream commit 0c8a6e72f3c04bfe92a64e5e0791bfe006aabe08 ] > > The iio_triggered_buffer_{predisable,postenable} functions attach/detach > the poll functions. > > The iio_triggered_buffer_predisable() should be called last, to detach the > poll func after the devices has been suspended. > > The position of iio_triggered_buffer_postenable() is correct. > > Note this is not stable material. It's a fix in the logical > model rather fixing an actual bug. These are being tidied up > throughout the subsystem to allow more substantial rework that > was blocked by variations in how things were done. See comment. This is not what I would consider stable material. > > Signed-off-by: Alexandru Ardelean > Acked-by: Matt Ranostay > Signed-off-by: Jonathan Cameron > Signed-off-by: Sasha Levin > --- > drivers/iio/chemical/atlas-ph-sensor.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/iio/chemical/atlas-ph-sensor.c b/drivers/iio/chemical/atlas-ph-sensor.c > index 3a20cb5d9bffc..6c175eb1c7a7f 100644 > --- a/drivers/iio/chemical/atlas-ph-sensor.c > +++ b/drivers/iio/chemical/atlas-ph-sensor.c > @@ -323,16 +323,16 @@ static int atlas_buffer_predisable(struct iio_dev *indio_dev) > struct atlas_data *data = iio_priv(indio_dev); > int ret; > > - ret = iio_triggered_buffer_predisable(indio_dev); > + ret = atlas_set_interrupt(data, false); > if (ret) > return ret; > > - ret = atlas_set_interrupt(data, false); > + pm_runtime_mark_last_busy(&data->client->dev); > + ret = pm_runtime_put_autosuspend(&data->client->dev); > if (ret) > return ret; > > - pm_runtime_mark_last_busy(&data->client->dev); > - return pm_runtime_put_autosuspend(&data->client->dev); > + return iio_triggered_buffer_predisable(indio_dev); > } > > static const struct iio_trigger_ops atlas_interrupt_trigger_ops = {