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: Kai-Heng Feng <kai.heng.feng@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Родитель
99218cbf81
Коммит
d90d0c175c
|
@ -7159,7 +7159,8 @@ int stmmac_dvr_probe(struct device *device,
|
|||
|
||||
pm_runtime_get_noresume(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 &&
|
||||
priv->hw->pcs != STMMAC_PCS_RTBI) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче