net: wwan: t7xx: Fix Runtime PM initialization
authorKornel Dulęba <mindal@semihalf.com>
Thu, 26 Jan 2023 13:25:35 +0000 (13:25 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 28 Jan 2023 13:20:21 +0000 (13:20 +0000)
commite3d6d152a1cbdee25f2e3962009a2751b54e2297
treeac547964f725388e0ce9e873b6fbd6aea94a7be1
parent364d0221f1788e5225006ba7a0026e5968431c29
net: wwan: t7xx: Fix Runtime PM initialization

For PCI devices the Runtime PM refcount is incremented twice:
1. During device enumeration with a call to pm_runtime_forbid.
2. Just before a driver probe logic is called.
Because of that in order to enable Runtime PM on a given device
we have to call both pm_runtime_allow and pm_runtime_put_noidle,
once it's ready to be runtime suspended.
The former was missing causing the pm refcount to never reach 0.

Fixes: d10b3a695ba0 ("net: wwan: t7xx: Runtime PM")
Signed-off-by: Kornel Dulęba <mindal@semihalf.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/wwan/t7xx/t7xx_pci.c