forked from kofal.net/zmk
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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user