drivers: display: make driver API structs const

Save precious RAM by making sure driver API structs are declared as
const

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commit is contained in:
Benjamin Cabé 2024-06-12 15:04:46 +02:00 committed by David Leach
parent 6a29c79d4e
commit c44b777221
5 changed files with 5 additions and 5 deletions

View file

@ -606,7 +606,7 @@ static int display_smartbond_pm_action(const struct device *dev, enum pm_device_
}
#endif
static struct display_driver_api display_smartbond_driver_api = {
static const struct display_driver_api display_smartbond_driver_api = {
.write = display_smartbond_write,
.read = display_smartbond_read,
.get_framebuffer = display_smartbond_get_framebuffer,

View file

@ -278,7 +278,7 @@ static const struct ls0xx_config ls0xx_config = {
#endif
};
static struct display_driver_api ls0xx_driver_api = {
static const struct display_driver_api ls0xx_driver_api = {
.blanking_on = ls0xx_blanking_on,
.blanking_off = ls0xx_blanking_off,
.write = ls0xx_write,

View file

@ -455,7 +455,7 @@ static int ssd1306_init(const struct device *dev)
return 0;
}
static struct display_driver_api ssd1306_driver_api = {
static const struct display_driver_api ssd1306_driver_api = {
.blanking_on = ssd1306_suspend,
.blanking_off = ssd1306_resume,
.write = ssd1306_write,

View file

@ -1020,7 +1020,7 @@ static int ssd16xx_init(const struct device *dev)
return ssd16xx_controller_init(dev);
}
static struct display_driver_api ssd16xx_driver_api = {
static const struct display_driver_api ssd16xx_driver_api = {
.blanking_on = ssd16xx_blanking_on,
.blanking_off = ssd16xx_blanking_off,
.write = ssd16xx_write,

View file

@ -754,7 +754,7 @@ static const struct uc81xx_quirks uc8179_quirks = {
};
#endif
static struct display_driver_api uc81xx_driver_api = {
static const struct display_driver_api uc81xx_driver_api = {
.blanking_on = uc81xx_blanking_on,
.blanking_off = uc81xx_blanking_off,
.write = uc81xx_write,