struct mci_data::src and ::dest are members of the same union and thus
can be used interchangeably, provided that the difference in type is
accounted for.

Nevertheless, it makes code easier to reason about and saves needless
casts to use the correct union member. Do that for the read case.

Signed-off-by: Ahmad Fatoum <a.fat...@pengutronix.de>
---
 drivers/mci/stm32_sdmmc2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mci/stm32_sdmmc2.c b/drivers/mci/stm32_sdmmc2.c
index 64a7171d2cae..30745ea7c6c0 100644
--- a/drivers/mci/stm32_sdmmc2.c
+++ b/drivers/mci/stm32_sdmmc2.c
@@ -271,7 +271,7 @@ static dma_addr_t stm32_sdmmc2_start_data(struct 
stm32_sdmmc2_priv *priv,
 
        if (data->flags & MMC_DATA_READ) {
                data_ctrl |= SDMMC_DCTRL_DTDIR;
-               idmabase0 = dma_map_single(priv->dev, (void *)data->src, 
num_bytes,
+               idmabase0 = dma_map_single(priv->dev, data->dest, num_bytes,
                                           DMA_FROM_DEVICE);
        } else {
                idmabase0 = dma_map_single(priv->dev, (void *)data->src, 
num_bytes,
-- 
2.39.5


Reply via email to