Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp992972imu; Wed, 28 Nov 2018 02:58:38 -0800 (PST) X-Google-Smtp-Source: AFSGD/Vf1dkipUarK0Q+aIOpRcDmudqSo+l7abV2a+8/VseOAMlE62lHEKtyjwSCAUdLNwwUdr+g X-Received: by 2002:a17:902:2904:: with SMTP id g4mr36180698plb.39.1543402718808; Wed, 28 Nov 2018 02:58:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543402718; cv=none; d=google.com; s=arc-20160816; b=m98WwSkYbDpXSUIM4FfLAOGXaJldbNn/6I0s0wUjHmZV9wojSYcAb1XpAl+491xVKx 9D2JDwcVXr+aa+YasmyIny91HmcWM/z6HQCkdtI4+xhJB49z+Sgn0ioTIWrvcxIVo3Np QJHg+rW+0/FVgMxO6C8oOqUlmu0w7oSxp8QmPyPTfsJLhDYQazNO0uNf7DZb2MY/gvv2 lTcbS8Vif6SePw/x0Ll7yDKYQ5qWWr6z0z+8VMauuge8yAXJ8EoBKLmak0TJmrvlyM2H EvxXXPRLZ46n9V8Ri39RA9xjYsTSSSsydVZhY8i/sB8tnQSw7jR2zDbIUL0rQXNneIV2 URHQ== 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 r81si8454547pfr.164.2018.11.28.02.58.23; Wed, 28 Nov 2018 02:58:38 -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 S1728370AbeK1Vpc (ORCPT + 99 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 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. 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(-) 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) -- 2.19.1