]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
phy: core: Remove unused phy_pm_runtime_(allow|forbid)
authorDr. David Alan Gilbert <linux@treblig.org>
Thu, 6 Mar 2025 01:54:08 +0000 (01:54 +0000)
committerVinod Koul <vkoul@kernel.org>
Mon, 10 Mar 2025 07:28:07 +0000 (12:58 +0530)
phy_pm_runtime_allow() and phy_pm_runtime_forbid() were added in 2013
as part of
commit ff764963479a ("drivers: phy: add generic PHY framework")
but have remained unused.

Remove them.
Fix up the (English) docs - I've left the Chinese translation.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Link: https://lore.kernel.org/r/20250306015408.277729-1-linux@treblig.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Documentation/driver-api/phy/phy.rst
drivers/phy/phy-core.c
include/linux/phy/phy.h

index 81785c084f3ec2dd02af2131fbc8632cb5b33b0b..719a2b3fd2ab0e1ac99034896cd2014cafdb6d09 100644 (file)
@@ -198,8 +198,7 @@ pm_runtime_get_sync of PHY provider device because of parent-child relationship.
 It should also be noted that phy_power_on and phy_power_off performs
 phy_pm_runtime_get_sync and phy_pm_runtime_put respectively.
 There are exported APIs like phy_pm_runtime_get, phy_pm_runtime_get_sync,
-phy_pm_runtime_put, phy_pm_runtime_put_sync, phy_pm_runtime_allow and
-phy_pm_runtime_forbid for performing PM operations.
+phy_pm_runtime_put and phy_pm_runtime_put_sync for performing PM operations.
 
 PHY Mappings
 ============
index 067316dfcd83a6fc8428cddd27d3b7ebfc270831..8e2daea81666bf8a76d9c936c1a16d6318105c91 100644 (file)
@@ -214,30 +214,6 @@ int phy_pm_runtime_put_sync(struct phy *phy)
 }
 EXPORT_SYMBOL_GPL(phy_pm_runtime_put_sync);
 
-void phy_pm_runtime_allow(struct phy *phy)
-{
-       if (!phy)
-               return;
-
-       if (!pm_runtime_enabled(&phy->dev))
-               return;
-
-       pm_runtime_allow(&phy->dev);
-}
-EXPORT_SYMBOL_GPL(phy_pm_runtime_allow);
-
-void phy_pm_runtime_forbid(struct phy *phy)
-{
-       if (!phy)
-               return;
-
-       if (!pm_runtime_enabled(&phy->dev))
-               return;
-
-       pm_runtime_forbid(&phy->dev);
-}
-EXPORT_SYMBOL_GPL(phy_pm_runtime_forbid);
-
 /**
  * phy_init - phy internal initialization before phy operation
  * @phy: the phy returned by phy_get()
index 03cd5bae92d3f189d739c453fe4c160dd2a5063e..e63e6e70e860421539179c8178cbe742410cc546 100644 (file)
@@ -227,8 +227,6 @@ int phy_pm_runtime_get(struct phy *phy);
 int phy_pm_runtime_get_sync(struct phy *phy);
 int phy_pm_runtime_put(struct phy *phy);
 int phy_pm_runtime_put_sync(struct phy *phy);
-void phy_pm_runtime_allow(struct phy *phy);
-void phy_pm_runtime_forbid(struct phy *phy);
 int phy_init(struct phy *phy);
 int phy_exit(struct phy *phy);
 int phy_power_on(struct phy *phy);
@@ -321,16 +319,6 @@ static inline int phy_pm_runtime_put_sync(struct phy *phy)
        return -ENOSYS;
 }
 
-static inline void phy_pm_runtime_allow(struct phy *phy)
-{
-       return;
-}
-
-static inline void phy_pm_runtime_forbid(struct phy *phy)
-{
-       return;
-}
-
 static inline int phy_init(struct phy *phy)
 {
        if (!phy)