pm: device: remove usage of ctrl_command

The callback is now invoked to set the device PM state in all cases, so
the usage of ctrl_command is redundant.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2021-06-07 18:27:39 +02:00 committed by Anas Nashif
commit da0ff4ae46
37 changed files with 319 additions and 509 deletions

View file

@ -181,12 +181,10 @@ static int arc_v2_irq_unit_device_ctrl(const struct device *dev,
int ret = 0;
unsigned int key = arch_irq_lock();
if (ctrl_command == PM_DEVICE_STATE_SET) {
if (*state == PM_DEVICE_STATE_SUSPEND) {
ret = arc_v2_irq_unit_suspend(dev);
} else if (*state == PM_DEVICE_STATE_ACTIVE) {
ret = arc_v2_irq_unit_resume(dev);
}
if (*state == PM_DEVICE_STATE_SUSPEND) {
ret = arc_v2_irq_unit_suspend(dev);
} else if (*state == PM_DEVICE_STATE_ACTIVE) {
ret = arc_v2_irq_unit_resume(dev);
}
arch_irq_unlock(key);