From e7875de3f9ad434e1c6e21416c58afcb21ed3acf Mon Sep 17 00:00:00 2001 From: Pisit Sawangvonganan Date: Thu, 4 Jan 2024 22:36:32 +0700 Subject: [PATCH] drivers: sdhc: set 'sdhc_driver_api' as 'static const' This change marks each instance of the 'api' as 'static const'. The rationale is that 'api' is used for declaring internal module interfaces and is not intended to be modified at runtime. By using 'static const', we ensure immutability, leading to usage of only .rodata and a reduction in the .data area. Signed-off-by: Pisit Sawangvonganan --- drivers/sdhc/sdhc_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/sdhc/sdhc_spi.c b/drivers/sdhc/sdhc_spi.c index 48e3704a09..7462e711dc 100644 --- a/drivers/sdhc/sdhc_spi.c +++ b/drivers/sdhc/sdhc_spi.c @@ -762,7 +762,7 @@ static int sdhc_spi_init(const struct device *dev) return ret; } -static struct sdhc_driver_api sdhc_spi_api = { +static const struct sdhc_driver_api sdhc_spi_api = { .request = sdhc_spi_request, .set_io = sdhc_spi_set_io, .get_host_props = sdhc_spi_get_host_props,