[PATCH v4 1/1] mmc: use dmaengine_get_dma_device() instead of chan->device->dev
Arnd Bergmann
arnd at arndb.de
Wed Sep 23 11:57:04 PDT 2026
On Wed, Sep 23, 2026, at 20:45, Frank.Li at oss.nxp.com wrote:
> @@ -214,7 +214,7 @@ config MMC_SDHCI_OF_AT91
> config MMC_SDHCI_OF_ESDHC
> tristate "SDHCI OF support for the Freescale eSDHC controller"
> depends on MMC_SDHCI_PLTFM
> - depends on PPC || ARCH_MXC || ARCH_LAYERSCAPE || COMPILE_TEST
> + depends on PPC || ARCHMXC || ARCH_LAYERSCAPE || COMPILE_TEST
> select MMC_SDHCI_IO_ACCESSORS
> select FSL_GUTS
This looks like an accidental bug that should be removed from the patch.
> @@ -961,7 +961,7 @@ static void atmci_dma_cleanup(struct atmel_mci *host)
> struct mmc_data *data = host->data;
>
> if (data)
> - dma_unmap_sg(host->dma.chan->device->dev,
> + dma_unmap_sg(dmaengine_get_dma_device(host->dma.chan),
> data->sg, data->sg_len,
> mmc_get_dma_dir(data));
Since you have the exact construct in a lot of drivers, would
it make sense to take this one step further and introduce
a new set of helpers in drivers/dma/dmaengine.h, such as
unsigned int dmaengine_map_sg(struct dma_chan *chan, struct scatterlist *sg, ...);
Arnd
More information about the linux-arm-kernel
mailing list