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

@ -1927,13 +1927,9 @@ static int uarte_nrfx_pm_control(const struct device *dev,
{
enum pm_device_state curr_state;
if (ctrl_command == PM_DEVICE_STATE_SET) {
enum pm_device_state curr_state;
(void)pm_device_state_get(dev, &curr_state);
if (*state != curr_state) {
uarte_nrfx_set_power_state(dev, *state);
}
(void)pm_device_state_get(dev, &curr_state);
if (*state != curr_state) {
uarte_nrfx_set_power_state(dev, *state);
}
return 0;