Skip to content

Commit

Permalink
driver/dma_smartbond: Fix driver initialization when PM_DEVICE is set
Browse files Browse the repository at this point in the history
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 <[email protected]>
(cherry picked from commit 135214d)
  • Loading branch information
ydamigos authored and github-actions[bot] committed Nov 12, 2024
1 parent 321e39a commit fb48bd8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/dma/dma_smartbond.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit fb48bd8

Please sign in to comment.