From: Zijun Hu <zijun_hu@icloud.com>
To: Jonathan Corbet <corbet@lwn.net>, Alex Shi <alexs@kernel.org>,
Yanteng Si <si.yanteng@linux.dev>, Vinod Koul <vkoul@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>
Cc: Zijun Hu <zijun_hu@icloud.com>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-phy@lists.infradead.org,
Zijun Hu <quic_zijuhu@quicinc.com>
Subject: [PATCH RESEND 1/2] phy: core: Remove API devm_of_phy_provider_unregister()
Date: Mon, 14 Apr 2025 19:49:04 +0800 [thread overview]
Message-ID: <20250414-remove-apis-v1-1-6fddc9a5a16d@quicinc.com> (raw)
In-Reply-To: <20250414-remove-apis-v1-0-6fddc9a5a16d@quicinc.com>
From: Zijun Hu <quic_zijuhu@quicinc.com>
API devm_of_phy_provider_unregister() has not had callers
since 2013-09-27 when it was introduced.
Remove the API.
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
---
Documentation/driver-api/phy/phy.rst | 5 +----
.../translations/zh_CN/driver-api/phy/phy.rst | 5 +----
drivers/phy/phy-core.c | 19 -------------------
include/linux/phy/phy.h | 6 ------
4 files changed, 2 insertions(+), 33 deletions(-)
diff --git a/Documentation/driver-api/phy/phy.rst b/Documentation/driver-api/phy/phy.rst
index 81785c084f3ec2dd02af2131fbc8632cb5b33b0b..be3687a2a11bbf84e6e5561b11931ea6db984434 100644
--- a/Documentation/driver-api/phy/phy.rst
+++ b/Documentation/driver-api/phy/phy.rst
@@ -64,12 +64,9 @@ macros can be used to override the node containing the children.
__devm_of_phy_provider_register_full(dev, children,
THIS_MODULE, xlate)
- void devm_of_phy_provider_unregister(struct device *dev,
- struct phy_provider *phy_provider);
void of_phy_provider_unregister(struct phy_provider *phy_provider);
-devm_of_phy_provider_unregister and of_phy_provider_unregister can be used to
-unregister the PHY.
+of_phy_provider_unregister can be used to unregister the PHY.
Creating the PHY
================
diff --git a/Documentation/translations/zh_CN/driver-api/phy/phy.rst b/Documentation/translations/zh_CN/driver-api/phy/phy.rst
index 0d7489081b904d6fc5aa21824c969e325e801297..2d3f98deb92035c44fcb1ff0e3dc8543053140f6 100644
--- a/Documentation/translations/zh_CN/driver-api/phy/phy.rst
+++ b/Documentation/translations/zh_CN/driver-api/phy/phy.rst
@@ -63,12 +63,9 @@ devm_of_phy_provider_register_full() 宏来覆盖包含子节点的节点。
__devm_of_phy_provider_register_full(dev, children,
THIS_MODULE, xlate)
- void devm_of_phy_provider_unregister(struct device *dev,
- struct phy_provider *phy_provider);
void of_phy_provider_unregister(struct phy_provider *phy_provider);
-devm_of_phy_provider_unregister 和 of_phy_provider_unregister
-可以被用来注销PHY.
+of_phy_provider_unregister() 可以被用来注销PHY.
创建PHY
=======
diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
index 8dfdce605a905d7f38205727151258af41f807a9..dd6302dfd14d2ec060857fc019268096c33e37a2 100644
--- a/drivers/phy/phy-core.c
+++ b/drivers/phy/phy-core.c
@@ -1248,25 +1248,6 @@ void of_phy_provider_unregister(struct phy_provider *phy_provider)
}
EXPORT_SYMBOL_GPL(of_phy_provider_unregister);
-/**
- * devm_of_phy_provider_unregister() - remove phy provider from the framework
- * @dev: struct device of the phy provider
- * @phy_provider: phy provider returned by of_phy_provider_register()
- *
- * destroys the devres associated with this phy provider and invokes
- * of_phy_provider_unregister to unregister the phy provider.
- */
-void devm_of_phy_provider_unregister(struct device *dev,
- struct phy_provider *phy_provider)
-{
- int r;
-
- r = devres_release(dev, devm_phy_provider_release, devm_phy_match,
- phy_provider);
- dev_WARN_ONCE(dev, r, "couldn't find PHY provider device resource\n");
-}
-EXPORT_SYMBOL_GPL(devm_of_phy_provider_unregister);
-
/**
* phy_release() - release the phy
* @dev: the dev member within phy
diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h
index 03cd5bae92d3f189d739c453fe4c160dd2a5063e..06037a7eefc4b0319008065d142c9f1caba2c74d 100644
--- a/include/linux/phy/phy.h
+++ b/include/linux/phy/phy.h
@@ -288,8 +288,6 @@ struct phy_provider *__devm_of_phy_provider_register(struct device *dev,
struct phy * (*of_xlate)(struct device *dev,
const struct of_phandle_args *args));
void of_phy_provider_unregister(struct phy_provider *phy_provider);
-void devm_of_phy_provider_unregister(struct device *dev,
- struct phy_provider *phy_provider);
int phy_create_lookup(struct phy *phy, const char *con_id, const char *dev_id);
void phy_remove_lookup(struct phy *phy, const char *con_id, const char *dev_id);
#else
@@ -547,10 +545,6 @@ static inline void of_phy_provider_unregister(struct phy_provider *phy_provider)
{
}
-static inline void devm_of_phy_provider_unregister(struct device *dev,
- struct phy_provider *phy_provider)
-{
-}
static inline int
phy_create_lookup(struct phy *phy, const char *con_id, const char *dev_id)
{
--
2.34.1
next prev parent reply other threads:[~2025-04-14 11:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-14 11:49 [PATCH RESEND 0/2] phy: core: Remove 2 APIs Zijun Hu
2025-04-14 11:49 ` Zijun Hu [this message]
2025-04-14 11:49 ` [PATCH RESEND 2/2] phy: core: Remove API devm_phy_destroy() Zijun Hu
2025-05-14 22:53 ` [PATCH RESEND 0/2] phy: core: Remove 2 APIs Zijun Hu
-- strict thread matches above, loose matches on Subject: below --
2025-02-25 12:32 Zijun Hu
2025-02-25 12:32 ` [PATCH RESEND 1/2] phy: core: Remove API devm_of_phy_provider_unregister() Zijun Hu
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=20250414-remove-apis-v1-1-6fddc9a5a16d@quicinc.com \
--to=zijun_hu@icloud.com \
--cc=alexs@kernel.org \
--cc=corbet@lwn.net \
--cc=kishon@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=quic_zijuhu@quicinc.com \
--cc=si.yanteng@linux.dev \
--cc=vkoul@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).