This enables us to use the helpers in functions that themselves take a const pointer to document their usage. Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> --- include/driver.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/driver.h b/include/driver.h index 0ea5799d0dfb..7b04d61d168a 100644 --- a/include/driver.h +++ b/include/driver.h @@ -627,12 +627,12 @@ static inline struct device_node *dev_of_node(struct device *dev) return IS_ENABLED(CONFIG_OFDEVICE) ? dev->of_node : NULL; } -static inline void *dev_get_priv(struct device *dev) +static inline void *dev_get_priv(const struct device *dev) { return dev->priv; } -static inline bool dev_is_probed(struct device *dev) +static inline bool dev_is_probed(const struct device *dev) { return dev->driver ? true : false; } -- 2.30.2