fix(drivers): Proper static/const for data/config (#2769)

Save a tiny bit of RAM by properly marking our device config
struct instances const consistently, and also add missing static
modifiers to properly isolate config/data for drivers.
This commit is contained in:
Pete Johanson
2025-01-15 10:35:35 -07:00
committed by GitHub
parent 700e9b264f
commit 6941abc2af
9 changed files with 14 additions and 17 deletions

View File

@@ -515,7 +515,7 @@ static const struct kscan_driver_api kscan_matrix_api = {
.matrix_state = kscan_matrix_state_##n, \
COND_INTERRUPTS((.irqs = kscan_matrix_irqs_##n, ))}; \
\
static struct kscan_matrix_config kscan_matrix_config_##n = { \
static const struct kscan_matrix_config kscan_matrix_config_##n = { \
.rows = ARRAY_SIZE(kscan_matrix_rows_##n), \
.cols = ARRAY_SIZE(kscan_matrix_cols_##n), \
.outputs = \