From 741bbaca6dd727a5d81856ae67f45dfb9a3e32b8 Mon Sep 17 00:00:00 2001 From: Flavio Ceolin Date: Tue, 12 Mar 2024 11:11:03 -0700 Subject: [PATCH] soc/intel_adsp: ipc: Remove unnecessary device state lock There is no needed to lock/unlock a device state in its pm action callback. The power management subsystem should take care of serialize these calls. Signed-off-by: Flavio Ceolin --- soc/intel/intel_adsp/common/ipc.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/soc/intel/intel_adsp/common/ipc.c b/soc/intel/intel_adsp/common/ipc.c index bffa2e6710d..5a444f2d459 100644 --- a/soc/intel/intel_adsp/common/ipc.c +++ b/soc/intel/intel_adsp/common/ipc.c @@ -292,7 +292,6 @@ static int ipc_pm_action(const struct device *dev, enum pm_device_action action) switch (action) { case PM_DEVICE_ACTION_SUSPEND: - pm_device_state_lock(dev); if (api->suspend_fn) { ret = api->suspend_fn(dev, api->suspend_fn_args); if (!ret) { @@ -301,7 +300,6 @@ static int ipc_pm_action(const struct device *dev, enum pm_device_action action) } break; case PM_DEVICE_ACTION_RESUME: - pm_device_state_lock(dev); irq_enable(DT_IRQN(INTEL_ADSP_IPC_HOST_DTNODE)); if (!irq_is_enabled(DT_IRQN(INTEL_ADSP_IPC_HOST_DTNODE))) { ret = -EINTR; @@ -321,7 +319,6 @@ static int ipc_pm_action(const struct device *dev, enum pm_device_action action) return -ENOTSUP; } - pm_device_state_unlock(dev); return ret; }