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

@@ -371,14 +371,14 @@ static int il0323_init(const struct device *dev) {
return il0323_controller_init(dev);
}
static struct il0323_cfg il0323_config = {
static const struct il0323_cfg il0323_config = {
.spi = SPI_DT_SPEC_INST_GET(0, SPI_OP_MODE_MASTER | SPI_WORD_SET(8), 0),
.reset = GPIO_DT_SPEC_INST_GET(0, reset_gpios),
.busy = GPIO_DT_SPEC_INST_GET(0, busy_gpios),
.dc = GPIO_DT_SPEC_INST_GET(0, dc_gpios),
};
static struct display_driver_api il0323_driver_api = {
static const struct display_driver_api il0323_driver_api = {
.blanking_on = il0323_blanking_on,
.blanking_off = il0323_blanking_off,
.write = il0323_write,