Skip to content

Commit a0958a5

Browse files
mriesch-wvgregkh
authored andcommitted
net: stmmac: dwmac-rk: fix unbalanced pm_runtime_enable warnings
commit 2d26f6e upstream. This reverts commit 2c896fb "net: stmmac: dwmac-rk: add pd_gmac support for rk3399" and fixes unbalanced pm_runtime_enable warnings. In the commit to be reverted, support for power management was introduced to the Rockchip glue code. Later, power management support was introduced to the stmmac core code, resulting in multiple invocations of pm_runtime_{enable,disable,get_sync,put_sync}. The multiple invocations happen in rk_gmac_powerup and stmmac_{dvr_probe, resume} as well as in rk_gmac_powerdown and stmmac_{dvr_remove, suspend}, respectively, which are always called in conjunction. Fixes: 5ec5582 ("net: stmmac: add clocks management for gmac driver") Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Meng Li <Meng.Li@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 80407c6 commit a0958a5

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#include <linux/delay.h>
2222
#include <linux/mfd/syscon.h>
2323
#include <linux/regmap.h>
24-
#include <linux/pm_runtime.h>
2524

2625
#include "stmmac_platform.h"
2726

@@ -1336,9 +1335,6 @@ static int rk_gmac_powerup(struct rk_priv_data *bsp_priv)
13361335
return ret;
13371336
}
13381337

1339-
pm_runtime_enable(dev);
1340-
pm_runtime_get_sync(dev);
1341-
13421338
if (bsp_priv->integrated_phy)
13431339
rk_gmac_integrated_phy_powerup(bsp_priv);
13441340

@@ -1347,14 +1343,9 @@ static int rk_gmac_powerup(struct rk_priv_data *bsp_priv)
13471343

13481344
static void rk_gmac_powerdown(struct rk_priv_data *gmac)
13491345
{
1350-
struct device *dev = &gmac->pdev->dev;
1351-
13521346
if (gmac->integrated_phy)
13531347
rk_gmac_integrated_phy_powerdown(gmac);
13541348

1355-
pm_runtime_put_sync(dev);
1356-
pm_runtime_disable(dev);
1357-
13581349
phy_power_on(gmac, false);
13591350
gmac_clk_enable(gmac, false);
13601351
}

0 commit comments

Comments
 (0)