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: /(? #include -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) { -- cgit v1.2.3