pm: runtime: return ENOSYS when not available

Zephyr policy is to use `-ENOSYS` when a functionality is not built.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2021-04-29 14:04:33 +02:00 committed by Anas Nashif
parent 0aa3df06c2
commit decc177e17

View file

@ -112,10 +112,10 @@ int device_pm_put_sync(const struct device *dev);
#else
static inline void device_pm_enable(const struct device *dev) { }
static inline void device_pm_disable(const struct device *dev) { }
static inline int device_pm_get(const struct device *dev) { return -ENOTSUP; }
static inline int device_pm_get_sync(const struct device *dev) { return -ENOTSUP; }
static inline int device_pm_put(const struct device *dev) { return -ENOTSUP; }
static inline int device_pm_put_sync(const struct device *dev) { return -ENOTSUP; }
static inline int device_pm_get(const struct device *dev) { return -ENOSYS; }
static inline int device_pm_get_sync(const struct device *dev) { return -ENOSYS; }
static inline int device_pm_put(const struct device *dev) { return -ENOSYS; }
static inline int device_pm_put_sync(const struct device *dev) { return -ENOSYS; }
#endif
/** @} */