power: device: adapt to new behavior for devices with nop pm ctrl
For backwards compatibility ignore not-supported errors for devices that don't support power management. Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
parent
de9ed4e6a1
commit
d99aa367f6
1 changed files with 1 additions and 1 deletions
|
@ -95,7 +95,7 @@ static int _sys_pm_devices(u32_t state)
|
|||
* and set the device states accordingly.
|
||||
*/
|
||||
rc = device_set_power_state(dev, state, NULL, NULL);
|
||||
if (rc != 0) {
|
||||
if ((rc != -ENOTSUP) && (rc != 0)) {
|
||||
LOG_DBG("%s did not enter %s state: %d",
|
||||
dev->name, device_pm_state_str(state), rc);
|
||||
return rc;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue