linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandru Ardelean <aardelean@deviqon.com>
To: linux-kernel@vger.kernel.org
Cc: lgirdwood@gmail.com, broonie@kernel.org,
	Alexandru Ardelean <aardelean@deviqon.com>
Subject: [PATCH 4/4] regulator: devres: unexport devm_regulator_unregister_supply_alias()
Date: Fri, 25 Jun 2021 15:23:24 +0300	[thread overview]
Message-ID: <20210625122324.327585-5-aardelean@deviqon.com> (raw)
In-Reply-To: <20210625122324.327585-1-aardelean@deviqon.com>

This API hook isn't used anywhere outside of the regulator devres code.
This function is needed for the devm_regulator_bulk_register_supply_alias()
function on the error path, to cleanup any previously registered supply
aliases.

This change makes the devm_regulator_unregister_supply_alias() local to the
regulator core framework, to avoid it being used in any weird logic.
It's also removing the doc-string for
devm_regulator_unregister_supply_alias(), since it doesn't need to be
documented anymore, as no other external consumer should use it.

Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com>
---
 drivers/regulator/devres.c         | 16 ++--------------
 include/linux/regulator/consumer.h |  7 -------
 2 files changed, 2 insertions(+), 21 deletions(-)

diff --git a/drivers/regulator/devres.c b/drivers/regulator/devres.c
index 007855ae165b..826c29499d69 100644
--- a/drivers/regulator/devres.c
+++ b/drivers/regulator/devres.c
@@ -267,19 +267,8 @@ int devm_regulator_register_supply_alias(struct device *dev, const char *id,
 }
 EXPORT_SYMBOL_GPL(devm_regulator_register_supply_alias);
 
-/**
- * devm_regulator_unregister_supply_alias - Resource managed
- * regulator_unregister_supply_alias()
- *
- * @dev: device to supply
- * @id:  supply name or regulator ID
- *
- * Unregister an alias registered with
- * devm_regulator_register_supply_alias(). Normally this function
- * will not need to be called and the resource management code
- * will ensure that the resource is freed.
- */
-void devm_regulator_unregister_supply_alias(struct device *dev, const char *id)
+static void devm_regulator_unregister_supply_alias(struct device *dev,
+						   const char *id)
 {
 	struct regulator_supply_alias_match match;
 	int rc;
@@ -292,7 +281,6 @@ void devm_regulator_unregister_supply_alias(struct device *dev, const char *id)
 	if (rc != 0)
 		WARN_ON(rc);
 }
-EXPORT_SYMBOL_GPL(devm_regulator_unregister_supply_alias);
 
 /**
  * devm_regulator_bulk_register_supply_alias - Managed register
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h
index 10ff6b66ca9e..d5441345d024 100644
--- a/include/linux/regulator/consumer.h
+++ b/include/linux/regulator/consumer.h
@@ -222,8 +222,6 @@ void regulator_bulk_unregister_supply_alias(struct device *dev,
 int devm_regulator_register_supply_alias(struct device *dev, const char *id,
 					 struct device *alias_dev,
 					 const char *alias_id);
-void devm_regulator_unregister_supply_alias(struct device *dev,
-					    const char *id);
 
 int devm_regulator_bulk_register_supply_alias(struct device *dev,
 					      const char *const *id,
@@ -403,11 +401,6 @@ static inline int devm_regulator_register_supply_alias(struct device *dev,
 	return 0;
 }
 
-static inline void devm_regulator_unregister_supply_alias(struct device *dev,
-							  const char *id)
-{
-}
-
 static inline int devm_regulator_bulk_register_supply_alias(struct device *dev,
 						const char *const *id,
 						struct device *alias_dev,
-- 
2.31.1


  parent reply	other threads:[~2021-06-25 12:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-25 12:23 [PATCH 0/4] regulator: devres: remove unused device-managed unregister APIs Alexandru Ardelean
2021-06-25 12:23 ` [PATCH 1/4] regulator: devres: remove devm_regulator_unregister_notifier() function Alexandru Ardelean
2021-06-25 12:23 ` [PATCH 2/4] regulator: devres: remove devm_regulator_unregister() function Alexandru Ardelean
2021-06-25 12:23 ` [PATCH 3/4] regulator: devres: remove devm_regulator_bulk_unregister_supply_alias() Alexandru Ardelean
2021-06-25 12:23 ` Alexandru Ardelean [this message]
2021-07-12 10:45 ` [PATCH 0/4] regulator: devres: remove unused device-managed unregister APIs Mark Brown

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=20210625122324.327585-5-aardelean@deviqon.com \
    --to=aardelean@deviqon.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).