All of lore.kernel.org
 help / color / mirror / Atom feed
From: linux@treblig.org
To: lgirdwood@gmail.com, broonie@kernel.org
Cc: linux-doc@vger.kernel.org, corbet@lwn.net,
	linux-kernel@vger.kernel.org,
	"Dr. David Alan Gilbert" <linux@treblig.org>
Subject: [PATCH 2/5] regulator: core: Remove unused regulator_bulk_force_disable
Date: Sat, 26 Apr 2025 18:51:40 +0100	[thread overview]
Message-ID: <20250426175143.128086-3-linux@treblig.org> (raw)
In-Reply-To: <20250426175143.128086-1-linux@treblig.org>

From: "Dr. David Alan Gilbert" <linux@treblig.org>

regulator_bulk_force_disable() was explicitly added in 2012 by
commit e1de2f423462 ("regulator: add regulator_bulk_force_disable
function")

but hasn't been used.

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
---
 drivers/regulator/core.c           | 34 ------------------------------
 include/linux/regulator/consumer.h |  8 -------
 2 files changed, 42 deletions(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 90629a756693..32e3919e37d2 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -5196,40 +5196,6 @@ int regulator_bulk_disable(int num_consumers,
 }
 EXPORT_SYMBOL_GPL(regulator_bulk_disable);
 
-/**
- * regulator_bulk_force_disable - force disable multiple regulator consumers
- *
- * @num_consumers: Number of consumers
- * @consumers:     Consumer data; clients are stored here.
- *
- * This convenience API allows consumers to forcibly disable multiple regulator
- * clients in a single API call.
- * NOTE: This should be used for situations when device damage will
- * likely occur if the regulators are not disabled (e.g. over temp).
- * Although regulator_force_disable function call for some consumers can
- * return error numbers, the function is called for all consumers.
- *
- * Return: 0 on success or a negative error number on failure.
- */
-int regulator_bulk_force_disable(int num_consumers,
-			   struct regulator_bulk_data *consumers)
-{
-	int i;
-	int ret = 0;
-
-	for (i = 0; i < num_consumers; i++) {
-		consumers[i].ret =
-			    regulator_force_disable(consumers[i].consumer);
-
-		/* Store first error for reporting */
-		if (consumers[i].ret && !ret)
-			ret = consumers[i].ret;
-	}
-
-	return ret;
-}
-EXPORT_SYMBOL_GPL(regulator_bulk_force_disable);
-
 /**
  * regulator_bulk_free - free multiple regulator consumers
  *
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h
index 1e20c7330cd4..999eba865c20 100644
--- a/include/linux/regulator/consumer.h
+++ b/include/linux/regulator/consumer.h
@@ -209,8 +209,6 @@ int devm_regulator_bulk_get_enable(struct device *dev, int num_consumers,
 				   const char * const *id);
 int regulator_bulk_disable(int num_consumers,
 			   struct regulator_bulk_data *consumers);
-int regulator_bulk_force_disable(int num_consumers,
-			   struct regulator_bulk_data *consumers);
 void regulator_bulk_free(int num_consumers,
 			 struct regulator_bulk_data *consumers);
 
@@ -470,12 +468,6 @@ static inline int regulator_bulk_disable(int num_consumers,
 	return 0;
 }
 
-static inline int regulator_bulk_force_disable(int num_consumers,
-					struct regulator_bulk_data *consumers)
-{
-	return 0;
-}
-
 static inline void regulator_bulk_free(int num_consumers,
 				       struct regulator_bulk_data *consumers)
 {
-- 
2.49.0


  parent reply	other threads:[~2025-04-26 17:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-26 17:51 [PATCH 0/5] Regulator deadcode cleanups linux
2025-04-26 17:51 ` [PATCH 1/5] regulator: devres: Remove unused devm_regulator_bulk_register_supply_alias linux
2025-04-26 17:51 ` linux [this message]
2025-04-26 17:51 ` [PATCH 3/5] regulator: core: Remove unused regulator_*drvdata functions linux
2025-04-26 17:51 ` [PATCH 4/5] regulator: core: Remove unused regulator_suspend_(disable|enable) linux
2025-04-26 17:51 ` [PATCH 5/5] regulator: core: Remove unused regulator_set_suspend_voltage linux
2025-04-27 14:34 ` [PATCH 0/5] Regulator deadcode cleanups Mark Brown
2025-04-27 14:58   ` Dr. David Alan Gilbert
2025-04-30 23:18     ` Mark Brown
2025-05-01  0:03       ` Dr. David Alan Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250426175143.128086-3-linux@treblig.org \
    --to=linux@treblig.org \
    --cc=broonie@kernel.org \
    --cc=corbet@lwn.net \
    --cc=lgirdwood@gmail.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.