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

@ -460,17 +460,7 @@ static inline int uart_npcx_set_power_state(const struct device *dev,
static int uart_npcx_pm_control(const struct device *dev, uint32_t ctrl_command,
enum pm_device_state *state)
{
int ret = 0;
switch (ctrl_command) {
case PM_DEVICE_STATE_SET:
ret = uart_npcx_set_power_state(dev, *state);
break;
default:
ret = -EINVAL;
}
return ret;
return uart_npcx_set_power_state(dev, *state);
}
#endif /* CONFIG_PM_DEVICE */