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
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue