Received: by 2002:ac0:950e:0:0:0:0:0 with SMTP id f14csp637100imc; Sat, 16 Mar 2019 11:05:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqww2J7kiaVnSCq6TnHPIIE70bXOgx6v0qcO2LX1XIEsVCW+3RBU7xFzX565UZgxBZDwowl0 X-Received: by 2002:aa7:92da:: with SMTP id k26mr10581066pfa.216.1552759503210; Sat, 16 Mar 2019 11:05:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552759503; cv=none; d=google.com; s=arc-20160816; b=y3hdOl4Hvr5hA7Vpqo6KDeoaycOQiJwxm7Av9c3RWJCJjlCcID+26gyOvsCWVFkl4A ND3MbapF4pcZ2B5qUxs9vQCvuOmzbSFPF6B6BUNtLX8J5jRdaG/7LMAQNmiYvA5g/rFc LSNzsNID07MFoCrwjp3Qkb1CKQ3p2MD9uhhFLHVP9vyvSA5m8mTTKfaSh3mygnUxQOAv sFZdutI+sPiry61058iScP6/14aefjdK+C9/PMsW2kLDK8kRTYzVmyLtJBcyXyMUxdYQ lehnsmF5ByuqELAQAUVxAukXDJASZn2FTphGYY01tX9qVim2S/eEGvF0t7Tgny/Y/xHC bbRA== 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 :dkim-signature; bh=JEsMreP8Did8DVnrNPxqsZn6jD2zNux+beBuqZ08zUU=; b=cGE954sUPLyNOWzzI7O5M+1JBAaMxzSlFup0HEnnGl5sIbxx5DMZpEmBOZ/3nvhF13 eazabvxMyrtsUX7/k9u+b8KNuVYqOadhc40u4Jua7oRv96G1MPf9CnSR6awWHI1MeUIK MMimIxLHMTgsIsvApkYDNOGZd3Y4tIi94Ybw3dbLG3p0z6QLLWuereP7WjcbQ/PYu+49 Q4ut8He9ZKaHZWBR12VwC9k4CGMiwNnGpdqfCSU6ALp6uE8zzgv6N3Qb4Il0dMKkHQXG Wius6miDe1nZ/ELECy6ySd2Zon6jkltzAZy28QqeXk6lpwIdbUKajDQDXAAg699Bsa5R qo/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UfbBR3Y9; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f11si4462756pgs.291.2019.03.16.11.04.47; Sat, 16 Mar 2019 11:05:03 -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; dkim=pass header.i=@kernel.org header.s=default header.b=UfbBR3Y9; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727067AbfCPSCp (ORCPT + 99 others); Sat, 16 Mar 2019 14:02:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:36284 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726493AbfCPSCo (ORCPT ); Sat, 16 Mar 2019 14:02:44 -0400 Received: from archlinux (cpc91196-cmbg18-2-0-cust659.5-4.cable.virginm.net [81.96.234.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6D80F218D0; Sat, 16 Mar 2019 18:02:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1552759363; bh=V2m3M1NDs50M1BPZw8KfDf4p8UdI9RgPKias2dXe1ow=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=UfbBR3Y9FOlbDvd9o3QOVoOCCY2joGL7Lik69FMCcZKyxle8tN6IVyE5QPzrQoh/z L6cCvP0Fv6+p5attjea1LFAhPVezKqXKB6NmxoY2h5lfNo0Ucl+WWErZ00cXQODHwl seN+KIeCdWFj5rWrDvGASwgkmdpZC4p2JlqDg0ss= Date: Sat, 16 Mar 2019 18:02:36 +0000 From: Jonathan Cameron To: Renato Lui Geh Cc: lars@metafoo.de, Michael.Hennerich@analog.com, knaack.h@gmx.de, pmeerw@pmeerw.net, gregkh@linuxfoundation.org, stefan.popa@analog.com, alexandru.Ardelean@analog.com, giuliano.belinassi@usp.br, robh+dt@kernel.org, mark.rutland@arm.com, linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, kernel-usp@googlegroups.com, devicetree@vger.kernel.org Subject: Re: [PATCH v5 07/11] staging: iio: ad7780: move regulator to after GPIO init Message-ID: <20190316180236.22a907b2@archlinux> In-Reply-To: References: 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 Fri, 15 Mar 2019 23:14:59 -0300 Renato Lui Geh wrote: > To maintain consistency between ad7780_probe and ad7780_remove orders, > regulator initialization has been moved to after GPIO initializations. > > Signed-off-by: Renato Lui Geh Applied, Thanks, Jonathan > --- > drivers/staging/iio/adc/ad7780.c | 20 ++++++++++---------- > 1 file changed, 10 insertions(+), 10 deletions(-) > > diff --git a/drivers/staging/iio/adc/ad7780.c b/drivers/staging/iio/adc/ad7780.c > index 977b381c1260..568c5b4472ff 100644 > --- a/drivers/staging/iio/adc/ad7780.c > +++ b/drivers/staging/iio/adc/ad7780.c > @@ -295,16 +295,6 @@ static int ad7780_probe(struct spi_device *spi) > > ad_sd_init(&st->sd, indio_dev, spi, &ad7780_sigma_delta_info); > > - st->reg = devm_regulator_get(&spi->dev, "avdd"); > - if (IS_ERR(st->reg)) > - return PTR_ERR(st->reg); > - > - ret = regulator_enable(st->reg); > - if (ret) { > - dev_err(&spi->dev, "Failed to enable specified AVdd supply\n"); > - return ret; > - } > - > st->chip_info = > &ad7780_chip_info_tbl[spi_get_device_id(spi)->driver_data]; > > @@ -321,6 +311,16 @@ static int ad7780_probe(struct spi_device *spi) > if (ret) > goto error_cleanup_buffer_and_trigger; > > + st->reg = devm_regulator_get(&spi->dev, "avdd"); > + if (IS_ERR(st->reg)) > + return PTR_ERR(st->reg); > + > + ret = regulator_enable(st->reg); > + if (ret) { > + dev_err(&spi->dev, "Failed to enable specified AVdd supply\n"); > + return ret; > + } > + > ret = ad_sd_setup_buffer_and_trigger(indio_dev); > if (ret) > goto error_disable_reg;