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:
parent
c2cf1ad203
commit
da0ff4ae46
37 changed files with 319 additions and 509 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue