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