提交 d90d0c17 编写于 作者: K Kai-Heng Feng 提交者: David S. Miller

net: stmmac: Fix "Unbalanced pm_runtime_enable!" warning

If the device is PCI based like intel-eth-pci, pm_runtime_enable() is
already called by pci_pm_init().

So only pm_runtime_enable() when it's not already enabled.
Signed-off-by: NKai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 99218cbf
...@@ -7159,7 +7159,8 @@ int stmmac_dvr_probe(struct device *device, ...@@ -7159,7 +7159,8 @@ int stmmac_dvr_probe(struct device *device,
pm_runtime_get_noresume(device); pm_runtime_get_noresume(device);
pm_runtime_set_active(device); pm_runtime_set_active(device);
pm_runtime_enable(device); if (!pm_runtime_enabled(device))
pm_runtime_enable(device);
if (priv->hw->pcs != STMMAC_PCS_TBI && if (priv->hw->pcs != STMMAC_PCS_TBI &&
priv->hw->pcs != STMMAC_PCS_RTBI) { priv->hw->pcs != STMMAC_PCS_RTBI) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册