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/rgb_underglow.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/rgb_underglow.c')
-rw-r--r-- | app/src/rgb_underglow.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/src/rgb_underglow.c b/app/src/rgb_underglow.c index b2943e6..f5ed9ce 100644 --- a/app/src/rgb_underglow.c +++ b/app/src/rgb_underglow.c @@ -46,14 +46,14 @@ struct rgb_underglow_state { bool on; }; -static struct device *led_strip; +static const struct device *led_strip; static struct led_rgb pixels[STRIP_NUM_PIXELS]; static struct rgb_underglow_state state; #if IS_ENABLED(CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER) -static struct device *ext_power; +static const struct device *ext_power; #endif static struct led_rgb hsb_to_rgb(struct led_hsb hsb) { @@ -238,7 +238,7 @@ static void zmk_rgb_underglow_save_state_work() { static struct k_delayed_work underglow_save_work; #endif -static int zmk_rgb_underglow_init(struct device *_arg) { +static int zmk_rgb_underglow_init(const struct device *_arg) { led_strip = device_get_binding(STRIP_LABEL); if (led_strip) { LOG_INF("Found LED strip device %s", STRIP_LABEL); |