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