From patchwork Wed Nov 28 10:43:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 152248 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp923721ljp; Wed, 28 Nov 2018 02:44:21 -0800 (PST) X-Google-Smtp-Source: AFSGD/UDep6J46DSMK3M6whMGI5x0Rg7D/Xuc7zpXhRAj73vKBQbmmWJ20h2s5Pbx4zEjsK0WAFD X-Received: by 2002:a63:1204:: with SMTP id h4mr32702619pgl.51.1543401861594; Wed, 28 Nov 2018 02:44:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543401861; cv=none; d=google.com; s=arc-20160816; b=IVCNo/p6r5nndlLo6q4k+op2tO3e3CEBLh4DrRekOrNmWcRZAp4D8xS5vtT9OezuST XioXn19I1RBaEjZ4BSoKDUmiaYMEo0XHBL0UU6PD0JObnZ2xB9VrbdBpTo6vYTbmn1gi CET60R1b9bDXS9ZDVaK7oxgxXdQSB3ZCPm7FytssGlD+YwM/tMk6CwzhNsHlQI9azy96 r4zQwLO6F9RCFGzGmq4fy/+0TVxIpvWmkcOaVoDKds6qLstsbYjTkVY45TQir/Vz88Hp 6w6OzetaMxIDmsS/YwyPBfddOX8IeFV6bxAh8oLXf6/PxSxncyzrMWZ15snxgp4Kpu9H frQQ== 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=1uQOl0jE+lEJ7qDRZSdw84mH6vUDxYf8b4kB11Qb3Ug=; b=dVuBjXMHpkMXBO5Q46MR0uHVwpsAHGSLlXUJp3e7ydha9OxHrlL3NZtv/bW0T9TJvq Lyo/6BXcQjB/XGi3AUrWNJcuAnP8DozF3ZepYH9o1podWuacofDivwtuAacJ6MQq7Dh2 xor5ODn1zwzYy0waw4dL6mtN+/rcRBFGFcGic6Pq8tzmY7kv58ChUL6wyGt4sBU2NgTs +2E66VYaUIBAnvqeWR+99YKab5cpJGcDfPHK18D2rJ0+WeFFbRVbress1tX6qy1mVEcy hqQL/TXAiMsWWViI9LgFhYNW3JpMAJBkkPOuaz6dfVKGdVHQk7Y+z7XtqOMSdHiAuEe0 AgSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UZyYbkFk; 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 r6si7076392pli.248.2018.11.28.02.44.21; Wed, 28 Nov 2018 02:44:21 -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=UZyYbkFk; 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 S1728377AbeK1Vpc (ORCPT + 32 others); Wed, 28 Nov 2018 16:45:32 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:44764 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728119AbeK1Vpb (ORCPT ); Wed, 28 Nov 2018 16:45:31 -0500 Received: by mail-lj1-f195.google.com with SMTP id k19-v6so22951515lji.11 for ; Wed, 28 Nov 2018 02:44:17 -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=1uQOl0jE+lEJ7qDRZSdw84mH6vUDxYf8b4kB11Qb3Ug=; b=UZyYbkFkpBwC3HkfdV23mGo6Oa+RM6a5ahe7ykaVE1nNS065LIt5QBJi+PC/Nwv5Py xaRlZGfBUmbND2jpEnHf3PEBjF+izNKix37xIQI6T+qL8IcV1La3HC2t1FvHEG3ZiEI7 HB3kH+LQ7KUQAIOzdF7k8PNUgI/c+BvGC31mo= 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=1uQOl0jE+lEJ7qDRZSdw84mH6vUDxYf8b4kB11Qb3Ug=; b=JUICw78jaaFkPFxVP8BKksMuCS6TeT3heCxAazaq7caQg6F6RDgIXCdEYzyjK8wE40 VB20sqHaPwzKsdwact/oOpuCPOhXDWwSCUIrwXrQfi8DrQFQ6gkGQA5gYQD8kr9S5wDH 95wiCyKMV0KYYHG42kiFt7CkUbpbXJ675k3bmxSY4EF0Qa/rUxiHsNalNLTnnZAon7HU 2vs8PfRMgX8ygEjEcmHDtC0nABctCBdYyCckP6iUvcMPNAmKygD/KZUxTf9aCuRAgDJU xeW3aKm8FivSjWwymQzkTiYoqjMHX3dD0dgolJoVUSN+8oen2zd9zC1EkcV1+lqFr6s4 sc8w== X-Gm-Message-State: AGRZ1gIiGiJ50NWIiSyfhTV5GScqOD4tdenyzLNY2QoS/jC3n89i0eIM MXCQ8Eh2sscRwFT47j1eIr/e2w== X-Received: by 2002:a2e:2b85:: with SMTP id r5-v6mr22045671ljr.91.1543401856328; Wed, 28 Nov 2018 02:44:16 -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.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Nov 2018 02:44:15 -0800 (PST) From: Linus Walleij To: Liam Girdwood , Mark Brown Cc: linux-kernel@vger.kernel.org, Charles Keepax , Bartosz Golaszewski , Linus Walleij Subject: [PATCH 10/10] regulator: tps65090: Let core handle GPIO descriptors Date: Wed, 28 Nov 2018 11:43:50 +0100 Message-Id: <20181128104350.31902-11-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 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. This patch requires "gpio: Export gpiod_get_from_of_node()" to be applied first. Fixes: 3012e81446d0 ("regulator: tps65090: Pass descriptor instead of GPIO number") Signed-off-by: Linus Walleij --- drivers/regulator/tps65090-regulator.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -- 2.19.1 diff --git a/drivers/regulator/tps65090-regulator.c b/drivers/regulator/tps65090-regulator.c index db714d5edafc..223f6974a9f3 100644 --- a/drivers/regulator/tps65090-regulator.c +++ b/drivers/regulator/tps65090-regulator.c @@ -376,11 +376,11 @@ static struct tps65090_platform_data *tps65090_parse_dt_reg_data( gflags = GPIOD_OUT_LOW; gflags |= GPIOD_FLAGS_BIT_NONEXCLUSIVE; - rpdata->gpiod = devm_gpiod_get_from_of_node(&pdev->dev, - tps65090_matches[idx].of_node, - "dcdc-ext-control-gpios", 0, - gflags, - "tps65090"); + rpdata->gpiod = gpiod_get_from_of_node( + tps65090_matches[idx].of_node, + "dcdc-ext-control-gpios", 0, + gflags, + "tps65090"); if (IS_ERR(rpdata->gpiod)) return ERR_CAST(rpdata->gpiod); if (!rpdata->gpiod)