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

@ -414,12 +414,10 @@ static int loapic_device_ctrl(const struct device *port,
{
int ret = 0;
if (ctrl_command == PM_DEVICE_STATE_SET) {
if (*state == PM_DEVICE_STATE_SUSPEND) {
ret = loapic_suspend(port);
} else if (*state == PM_DEVICE_STATE_ACTIVE) {
ret = loapic_resume(port);
}
if (*state == PM_DEVICE_STATE_SUSPEND) {
ret = loapic_suspend(port);
} else if (*state == PM_DEVICE_STATE_ACTIVE) {
ret = loapic_resume(port);
}
return ret;