Browse Source

driver/dma_smartbond: Fix driver initialization when PM_DEVICE is set

Fix DMA driver initialization when PM_DEVICE is set.
Don't put PM policy state lock if it is not active.

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
(cherry picked from commit 135214d844)
pull/81598/head
Ioannis Damigos 8 months ago committed by Anas Nashif
parent
commit
8cd40948c7
  1. 4
      drivers/dma/dma_smartbond.c

4
drivers/dma/dma_smartbond.c

@ -188,7 +188,9 @@ static inline void dma_smartbond_pm_policy_state_lock_get(void) @@ -188,7 +188,9 @@ static inline void dma_smartbond_pm_policy_state_lock_get(void)
static inline void dma_smartbond_pm_policy_state_lock_put(void)
{
#if defined(CONFIG_PM_DEVICE)
pm_policy_state_lock_put(PM_STATE_STANDBY, PM_ALL_SUBSTATES);
if (pm_policy_state_lock_is_active(PM_STATE_STANDBY, PM_ALL_SUBSTATES)) {
pm_policy_state_lock_put(PM_STATE_STANDBY, PM_ALL_SUBSTATES);
}
#endif
}

Loading…
Cancel
Save