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 <pisit@ndrsolution.com>
This commit is contained in:
Pisit Sawangvonganan 2024-01-04 22:36:32 +07:00 committed by Fabio Baltieri
parent cf6a3824a0
commit e7875de3f9

View file

@ -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,