From patchwork Tue Aug 16 18:50:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 74037 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp2145829qga; Tue, 16 Aug 2016 11:50:39 -0700 (PDT) X-Received: by 10.98.68.148 with SMTP id m20mr67469766pfi.0.1471373439669; Tue, 16 Aug 2016 11:50:39 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y187si33285539pfy.250.2016.08.16.11.50.38; Tue, 16 Aug 2016 11:50:39 -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=@linaro.org; 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 dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753185AbcHPSug (ORCPT + 27 others); Tue, 16 Aug 2016 14:50:36 -0400 Received: from mail-pf0-f172.google.com ([209.85.192.172]:33201 "EHLO mail-pf0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752720AbcHPSuf (ORCPT ); Tue, 16 Aug 2016 14:50:35 -0400 Received: by mail-pf0-f172.google.com with SMTP id y134so30108384pfg.0 for ; Tue, 16 Aug 2016 11:50:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=0aIhKhQxEbX+nxCRSI+k137CeYRn1L+/SREx1ng1GCc=; b=NdB7qjHzbfa14sv9w9sDo6YfmwhIIp1IeHED8GsUzGza1pFngPVb8FWAXWpOKjbg11 CzdWB8CYK9hebee3VckCCbginbTykfgiyipdnsSBtKOpN7GfsLTxEe42mG/K5Rj7svrs xhUbhk1RSy25PFYC6pzDZqtdeQ05hstxs5TIU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=0aIhKhQxEbX+nxCRSI+k137CeYRn1L+/SREx1ng1GCc=; b=mepusZa8KMhe8RVP6mwqlUDUvc2OEj8lWLRiR/mBbygRxC+nqUZuQIwXnZkY/ZBV4C 1NA2ybaWE7a3wavABMJ8/vkQNIavH5OgKVZGt0mM4zPH3bGGPQK1HCfxXn4R5kr+97Nq 96JZQYOuFpC0Ncg8RbF4Ybnzx+yrm6cgpU2/G0mBkVDkt4qAptz4mKMiX3rZpVs0WT3p MkZHGJNiE8SHeJM0PAxhX6kUSLY+AdXwmgxY5VSzvBC09sUgoY97wDH2h+2ONF+g+c3i Q6gJ8kqf7/IEHLhEpspDdCSvRPFHhFjse8fVPpVNTWWh2fu5xYnW1/0EoZ3+k7GrlSZh 65rA== X-Gm-Message-State: AEkoouuKJEVbn9carqxWWmZkdDKZ+wkqICfVsr83dBqD2ag4cScgmRmPLlWz+QgZ8EvSwEKq X-Received: by 10.98.14.72 with SMTP id w69mr9022189pfi.119.1471373434054; Tue, 16 Aug 2016 11:50:34 -0700 (PDT) Received: from localhost.localdomain (ip68-111-223-48.sd.sd.cox.net. [68.111.223.48]) by smtp.gmail.com with ESMTPSA id ad15sm41177946pac.33.2016.08.16.11.50.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 Aug 2016 11:50:33 -0700 (PDT) From: Bjorn Andersson To: Liam Girdwood , Mark Brown Cc: linux-kernel@vger.kernel.org Subject: [PATCH] Revert "regulator: Make bulk API support optional supplies" Date: Tue, 16 Aug 2016 11:50:32 -0700 Message-Id: <1471373432-13440-1-git-send-email-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.5.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patch was based on my missinterpretation of the API and only accidentally worked for me. Let's clean it out to not confuse others. This reverts commit 3ff3f518a135fa4592fe2817e9ac2cce1fa23dc2. Signed-off-by: Bjorn Andersson --- Sorry for not sending this earlier. drivers/regulator/core.c | 6 ++---- drivers/regulator/devres.c | 7 ++----- include/linux/regulator/consumer.h | 3 --- 3 files changed, 4 insertions(+), 12 deletions(-) -- 2.5.0 diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index db320e8fa865..8ccdaf89b1c3 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -3483,10 +3483,8 @@ int regulator_bulk_get(struct device *dev, int num_consumers, consumers[i].consumer = NULL; for (i = 0; i < num_consumers; i++) { - consumers[i].consumer = _regulator_get(dev, - consumers[i].supply, - false, - !consumers[i].optional); + consumers[i].consumer = regulator_get(dev, + consumers[i].supply); if (IS_ERR(consumers[i].consumer)) { ret = PTR_ERR(consumers[i].consumer); dev_err(dev, "Failed to get supply '%s': %d\n", diff --git a/drivers/regulator/devres.c b/drivers/regulator/devres.c index 6ad8ab4c578d..6ec1d400adae 100644 --- a/drivers/regulator/devres.c +++ b/drivers/regulator/devres.c @@ -164,11 +164,8 @@ int devm_regulator_bulk_get(struct device *dev, int num_consumers, consumers[i].consumer = NULL; for (i = 0; i < num_consumers; i++) { - consumers[i].consumer = _devm_regulator_get(dev, - consumers[i].supply, - consumers[i].optional ? - OPTIONAL_GET : - NORMAL_GET); + consumers[i].consumer = devm_regulator_get(dev, + consumers[i].supply); if (IS_ERR(consumers[i].consumer)) { ret = PTR_ERR(consumers[i].consumer); dev_err(dev, "Failed to get supply '%s': %d\n", diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index cae500b2c1d7..692108222271 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h @@ -140,8 +140,6 @@ struct regulator; * * @supply: The name of the supply. Initialised by the user before * using the bulk regulator APIs. - * @optional: The supply should be considered optional. Initialised by the user - * before using the bulk regulator APIs. * @consumer: The regulator consumer for the supply. This will be managed * by the bulk API. * @@ -151,7 +149,6 @@ struct regulator; */ struct regulator_bulk_data { const char *supply; - bool optional; struct regulator *consumer; /* private: Internal use */