diff options
author | innovaker <66737976+innovaker@users.noreply.github.com> | 2020-12-10 19:31:51 +0000 |
---|---|---|
committer | Pete Johanson <peter@peterjohanson.com> | 2020-12-14 12:41:25 -0500 |
commit | 00ca0d2f1cb0a939e5207454d89c6d37ef9f45a6 (patch) | |
tree | f5c8b1fa7bed4838393576376140e8420f2e415b /app/src/battery.c | |
parent | 1411092a7bb6e21e6e3a272737ad36d613e3b367 (diff) |
refactor(app): replace `struct device *` with `const struct device *`
Replaced with RegExp: /(?<!const )(struct device \*)/g
See: https://docs.zephyrproject.org/latest/releases/release-notes-2.4.html
PR: #467
Diffstat (limited to 'app/src/battery.c')
-rw-r--r-- | app/src/battery.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/src/battery.c b/app/src/battery.c index e78b2fb..777dbdb 100644 --- a/app/src/battery.c +++ b/app/src/battery.c @@ -17,9 +17,9 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include <zmk/event-manager.h> #include <zmk/events/battery-state-changed.h> -struct device *battery; +const struct device *battery; -static int zmk_battery_update(struct device *battery) { +static int zmk_battery_update(const struct device *battery) { struct sensor_value state_of_charge; int rc = sensor_sample_fetch_chan(battery, SENSOR_CHAN_GAUGE_STATE_OF_CHARGE); @@ -64,7 +64,7 @@ static void zmk_battery_timer(struct k_timer *timer) { k_work_submit(&battery_wo K_TIMER_DEFINE(battery_timer, zmk_battery_timer, NULL); -static int zmk_battery_init(struct device *_arg) { +static int zmk_battery_init(const struct device *_arg) { battery = device_get_binding("BATTERY"); if (battery == NULL) { |