From 00ca0d2f1cb0a939e5207454d89c6d37ef9f45a6 Mon Sep 17 00:00:00 2001 From: innovaker <66737976+innovaker@users.noreply.github.com> Date: Thu, 10 Dec 2020 19:31:51 +0000 Subject: refactor(app): replace `struct device *` with `const struct device *` Replaced with RegExp: /(?api; if (api->enable == NULL) { @@ -61,9 +61,9 @@ static inline int z_impl_ext_power_enable(struct device *dev) { * @retval 0 If successful. * @retval Negative errno code if failure. */ -__syscall int ext_power_disable(struct device *dev); +__syscall int ext_power_disable(const struct device *dev); -static inline int z_impl_ext_power_disable(struct device *dev) { +static inline int z_impl_ext_power_disable(const struct device *dev) { const struct ext_power_api *api = (const struct ext_power_api *)dev->api; if (api->disable == NULL) { @@ -81,9 +81,9 @@ static inline int z_impl_ext_power_disable(struct device *dev) { * @retval 1 if ext power is enabled. * @retval Negative errno code if failure. */ -__syscall int ext_power_get(struct device *dev); +__syscall int ext_power_get(const struct device *dev); -static inline int z_impl_ext_power_get(struct device *dev) { +static inline int z_impl_ext_power_get(const struct device *dev) { const struct ext_power_api *api = (const struct ext_power_api *)dev->api; if (api->get == NULL) { -- cgit v1.2.3