device_pm: correct nop documented behavior
The device_pm_control_nop function is documented to always return zero regardless of operation. However, when device_get_power_state() is invoked with this control function it returns success leaving the output parameter state unmodified, which may not be a valid device state. Document and implement that the nop control function returns -ENOTSUP always. Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
parent
c0fcff9b7d
commit
ae935dccdf
2 changed files with 2 additions and 2 deletions
|
@ -387,7 +387,7 @@ void device_busy_clear(struct device *busy_dev);
|
|||
* @param cb Unused
|
||||
* @param unused_arg Unused
|
||||
*
|
||||
* @retval 0 Always returns 0
|
||||
* @retval -ENOTSUP for all operations.
|
||||
*/
|
||||
int device_pm_control_nop(struct device *unused_device,
|
||||
u32_t unused_ctrl_command,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue