From 3206583db3bd96d555152f7dddc1361b6122799a Mon Sep 17 00:00:00 2001 From: TuxSH Date: Wed, 9 May 2018 19:11:16 +0200 Subject: [PATCH] [sdmmc] Fix const-correctness issue --- fusee/fusee-primary/src/sdmmc.c | 4 ++-- fusee/fusee-primary/src/sdmmc.h | 2 +- fusee/fusee-secondary/src/sdmmc.c | 4 ++-- fusee/fusee-secondary/src/sdmmc.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fusee/fusee-primary/src/sdmmc.c b/fusee/fusee-primary/src/sdmmc.c index 38029942f..eb708e0ed 100644 --- a/fusee/fusee-primary/src/sdmmc.c +++ b/fusee/fusee-primary/src/sdmmc.c @@ -2313,7 +2313,7 @@ void sdmmc_set_write_enable(struct mmc *mmc, enum sdmmc_write_permission perms) * * @return 0 on success, or an error code on failure. */ -int sdmmc_write(struct mmc *mmc, void *buffer, uint32_t block, unsigned int count) +int sdmmc_write(struct mmc *mmc, const void *buffer, uint32_t block, unsigned int count) { // Sanity check variables: we're especially careful about allowing writes to the switch eMMC. bool is_emmc = (mmc->controller == SWITCH_EMMC); @@ -2343,7 +2343,7 @@ int sdmmc_write(struct mmc *mmc, void *buffer, uint32_t block, unsigned int coun } // Execute the relevant read. - return sdmmc_send_command(mmc, command, MMC_RESPONSE_LEN48, MMC_CHECKS_ALL, extent, NULL, count, true, count > 1, buffer); + return sdmmc_send_command(mmc, command, MMC_RESPONSE_LEN48, MMC_CHECKS_ALL, extent, NULL, count, true, count > 1, (void *)buffer); } /** diff --git a/fusee/fusee-primary/src/sdmmc.h b/fusee/fusee-primary/src/sdmmc.h index a6ff51546..4c2a09390 100644 --- a/fusee/fusee-primary/src/sdmmc.h +++ b/fusee/fusee-primary/src/sdmmc.h @@ -247,7 +247,7 @@ void sdmmc_set_write_enable(struct mmc *mmc, enum sdmmc_write_permission perms); * * @return 0 on success, or an error code on failure. */ -int sdmmc_write(struct mmc *mmc, void *buffer, uint32_t block, unsigned int count); +int sdmmc_write(struct mmc *mmc, const void *buffer, uint32_t block, unsigned int count); /** diff --git a/fusee/fusee-secondary/src/sdmmc.c b/fusee/fusee-secondary/src/sdmmc.c index 38029942f..eb708e0ed 100644 --- a/fusee/fusee-secondary/src/sdmmc.c +++ b/fusee/fusee-secondary/src/sdmmc.c @@ -2313,7 +2313,7 @@ void sdmmc_set_write_enable(struct mmc *mmc, enum sdmmc_write_permission perms) * * @return 0 on success, or an error code on failure. */ -int sdmmc_write(struct mmc *mmc, void *buffer, uint32_t block, unsigned int count) +int sdmmc_write(struct mmc *mmc, const void *buffer, uint32_t block, unsigned int count) { // Sanity check variables: we're especially careful about allowing writes to the switch eMMC. bool is_emmc = (mmc->controller == SWITCH_EMMC); @@ -2343,7 +2343,7 @@ int sdmmc_write(struct mmc *mmc, void *buffer, uint32_t block, unsigned int coun } // Execute the relevant read. - return sdmmc_send_command(mmc, command, MMC_RESPONSE_LEN48, MMC_CHECKS_ALL, extent, NULL, count, true, count > 1, buffer); + return sdmmc_send_command(mmc, command, MMC_RESPONSE_LEN48, MMC_CHECKS_ALL, extent, NULL, count, true, count > 1, (void *)buffer); } /** diff --git a/fusee/fusee-secondary/src/sdmmc.h b/fusee/fusee-secondary/src/sdmmc.h index a6ff51546..4c2a09390 100644 --- a/fusee/fusee-secondary/src/sdmmc.h +++ b/fusee/fusee-secondary/src/sdmmc.h @@ -247,7 +247,7 @@ void sdmmc_set_write_enable(struct mmc *mmc, enum sdmmc_write_permission perms); * * @return 0 on success, or an error code on failure. */ -int sdmmc_write(struct mmc *mmc, void *buffer, uint32_t block, unsigned int count); +int sdmmc_write(struct mmc *mmc, const void *buffer, uint32_t block, unsigned int count); /**