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/kscan.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/kscan.c')
-rw-r--r-- | app/src/kscan.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/src/kscan.c b/app/src/kscan.c index b6ffc37..c22d71b 100644 --- a/app/src/kscan.c +++ b/app/src/kscan.c @@ -30,7 +30,8 @@ struct zmk_kscan_msg_processor { K_MSGQ_DEFINE(zmk_kscan_msgq, sizeof(struct zmk_kscan_event), CONFIG_ZMK_KSCAN_EVENT_QUEUE_SIZE, 4); -static void zmk_kscan_callback(struct device *dev, uint32_t row, uint32_t column, bool pressed) { +static void zmk_kscan_callback(const struct device *dev, uint32_t row, uint32_t column, + bool pressed) { struct zmk_kscan_event ev = { .row = row, .column = column, @@ -58,7 +59,7 @@ void zmk_kscan_process_msgq(struct k_work *item) { } int zmk_kscan_init(char *name) { - struct device *dev = device_get_binding(name); + const struct device *dev = device_get_binding(name); if (dev == NULL) { LOG_ERR("Failed to get the KSCAN device"); return -EINVAL; |