Skip to content

Commit e7875de

Browse files
ndrs-pstfabiobaltieri
authored andcommitted
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 <[email protected]>
1 parent cf6a382 commit e7875de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/sdhc/sdhc_spi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ static int sdhc_spi_init(const struct device *dev)
762762
return ret;
763763
}
764764

765-
static struct sdhc_driver_api sdhc_spi_api = {
765+
static const struct sdhc_driver_api sdhc_spi_api = {
766766
.request = sdhc_spi_request,
767767
.set_io = sdhc_spi_set_io,
768768
.get_host_props = sdhc_spi_get_host_props,

0 commit comments

Comments
 (0)