Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1020969imu; Wed, 28 Nov 2018 03:26:22 -0800 (PST) X-Google-Smtp-Source: AJdET5c0UtauAe31AC3jytBmYXPsgKpG78bDGneFHrzzKjI1TaqIeVSLK4ftEyGad4J8ZnPu43Ka X-Received: by 2002:a62:81c1:: with SMTP id t184mr37053116pfd.246.1543404382258; Wed, 28 Nov 2018 03:26:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543404382; cv=none; d=google.com; s=arc-20160816; b=cKZE9Y+cAS/7+gDCmM7pwQEBZ0RQHwtCNWFPDUmyQGyWN4U/5KtTIjdcIW1ez1Ygmd zj0yZBLdUaR6ikSGhZsuQcI8cKZX4hbMkYJ4TTTDcpPOvXaNa+QFsDUa7VHkqjkYZbAA yiIZtz50P7laqoDJqejVGtCFlR+3glrphVxFu88zT8vDa1KD+pWbK4U+kW0vrnM6K5EM kWbV8l64MHDkhp3y0NcxX++Bhkw3RJFDXd2XA8f8SIXSic3acCT3bFC5wlRuYYC9K1QV sdm6Yhi+mNKiGtpcsMCnRUf5REoF3WuOk8Dc3rpIaxMCOKDecsofsgkjxN/CBDq7l/uk EECA== 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:date:subject:cc:to:from :dkim-signature; bh=hQwrbOX6jWVhS2xXND6mp6kD61Itg1CrwK7UbFAIOVk=; b=Qc5D18PtFVUNRynSJYM5SW6XeBWwJRewlXsd/5C2zFCw5a2gtUky4nNy/0u0ZhdAd+ xocUqGtLp9TRgc2WvMJPhZgrd2VenLV1PLSqaSTkfVjBuN2FT21xfHNYlEJv7Pj/dnYK CyeCe7hp7AnRFDjGG0fewU6xew8V7NNmslULPc72dNhUaVL7seYsYMR+WwiQ7FiiIoLI cwsnNXjqdS6wgegxZu1IjwFLI4nEs3ZW78qJGX1Kmj0xn/7g66cdlWJ4WcWt0dLEHjZ1 JSeojPn6c9h5L0CuOogmJBbP8N5CAL+WLzPbmLLidV/hZauxyd6SKZuuQV8wCtDTElHK OjWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S9WNOSG0; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z2si6969281pgs.267.2018.11.28.03.26.06; Wed, 28 Nov 2018 03:26:22 -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; dkim=pass header.i=@linaro.org header.s=google header.b=S9WNOSG0; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728317AbeK1Vp2 (ORCPT + 99 others); Wed, 28 Nov 2018 16:45:28 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:45593 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728119AbeK1Vp1 (ORCPT ); Wed, 28 Nov 2018 16:45:27 -0500 Received: by mail-lf1-f66.google.com with SMTP id b20so18953315lfa.12 for ; Wed, 28 Nov 2018 02:44:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hQwrbOX6jWVhS2xXND6mp6kD61Itg1CrwK7UbFAIOVk=; b=S9WNOSG03IE7X5xnnj7NI1JR1pvp3focVQkkb+B92qtxxF46HE4HtXk666CL9U6FV4 l/knRppcviKlsAIuZP938PhblJ0MYGUBJorly1o1esaVcTu0P9xhphSBJC72KMQg/NwA 9Ejf0J0UEVydxS2VUeyIKW0SonhMCFurYqLFg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hQwrbOX6jWVhS2xXND6mp6kD61Itg1CrwK7UbFAIOVk=; b=MLl6Y6KkeAityWtBkfmGAJ1nTDiyVtDaFbCjNapywnNBvbuRl0QzlAHUmKudlD8cUc /vn2+HSAkZQxPcEKKwUfrN1niEX2fymPynDI1c16tv087/1DNPSsVN/pj/bxxZOS/oJm jFE6T4E9/QRWFa8FwWyZnTfxsOZD66zftOqNlip+LU4DvGaLo+Iw26jhqxZWi6uziluX Te5YYvwOiMnS+TeBNWE87BE28WKiWHhb7ezAnjECO6j6NB8UlnCxKjCW86VwErCBUpyh aBC17dX2h0T4DaZxL0k6QIbNWZ5SCLrHBWsCPzh4M+5F5Smf0ToDF2Rr3HGPYHpETZnw xNGw== X-Gm-Message-State: AA+aEWYOC1pVFAEsFzlzCMxD2RwTyMP0GR9uF7SbYwXe8rUshSqHh2A5 2JBevNZzsKC96jxyeADbrPD+QA== X-Received: by 2002:a19:c115:: with SMTP id r21mr2302710lff.144.1543401852268; Wed, 28 Nov 2018 02:44:12 -0800 (PST) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id c20sm1095101lfj.67.2018.11.28.02.44.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Nov 2018 02:44:11 -0800 (PST) From: Linus Walleij To: Liam Girdwood , Mark Brown Cc: linux-kernel@vger.kernel.org, Charles Keepax , Bartosz Golaszewski , Linus Walleij Subject: [PATCH 08/10] regulator: max77686: Let core handle GPIO descriptor Date: Wed, 28 Nov 2018 11:43:48 +0100 Message-Id: <20181128104350.31902-9-linus.walleij@linaro.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181128104350.31902-1-linus.walleij@linaro.org> References: <20181128104350.31902-1-linus.walleij@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the gpiod_get_from_of_node() rather than the devm_* version so that the regulator core can handle the lifecycle of these descriptors. Fixes: 96392c3d8ca4 ("regulator: max77686: Pass descriptor instead of GPIO number") Signed-off-by: Linus Walleij --- drivers/regulator/max77686-regulator.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/regulator/max77686-regulator.c b/drivers/regulator/max77686-regulator.c index f5cee1775905..236cd42002f0 100644 --- a/drivers/regulator/max77686-regulator.c +++ b/drivers/regulator/max77686-regulator.c @@ -255,8 +255,7 @@ static int max77686_of_parse_cb(struct device_node *np, case MAX77686_BUCK8: case MAX77686_BUCK9: case MAX77686_LDO20 ... MAX77686_LDO22: - config->ena_gpiod = devm_gpiod_get_from_of_node(max77686->dev, - np, + config->ena_gpiod = gpiod_get_from_of_node(np, "maxim,ena", 0, GPIOD_OUT_HIGH | GPIOD_FLAGS_BIT_NONEXCLUSIVE, -- 2.19.1