Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: s3cmci: Use DMA slave map rather than exported DMA filter

Support for DMA slave map has been added to the s3c24xx-dma
controller in commit 34681d84a0f7cc22ded1413dc79eef8a2f23d9c3
"dmaengine: s3c24xx: Add dma_slave_map for s3c2440 devices"
This patch converts the s3cmci driver to also use it, so we can
eventually get rid of the exported filter function once all
related DMA clients are updated.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Sylwester Nawrocki and committed by
Ulf Hansson
18fae5c4 c2c24819

+4 -11
+4 -11
drivers/mmc/host/s3cmci.c
··· 28 28 #include <mach/dma.h> 29 29 #include <mach/gpio-samsung.h> 30 30 31 - #include <linux/platform_data/dma-s3c24xx.h> 32 31 #include <linux/platform_data/mmc-s3cmci.h> 33 32 34 33 #include "s3cmci.h" ··· 1681 1682 gpio_direction_input(host->pdata->gpio_wprotect); 1682 1683 } 1683 1684 1684 - /* depending on the dma state, get a dma channel to use. */ 1685 + /* Depending on the dma state, get a DMA channel to use. */ 1685 1686 1686 1687 if (s3cmci_host_usedma(host)) { 1687 - dma_cap_mask_t mask; 1688 - 1689 - dma_cap_zero(mask); 1690 - dma_cap_set(DMA_SLAVE, mask); 1691 - 1692 - host->dma = dma_request_slave_channel_compat(mask, 1693 - s3c24xx_dma_filter, (void *)DMACH_SDI, &pdev->dev, "rx-tx"); 1694 - if (!host->dma) { 1688 + host->dma = dma_request_chan(&pdev->dev, "rx-tx"); 1689 + ret = PTR_ERR_OR_ZERO(host->dma); 1690 + if (ret) { 1695 1691 dev_err(&pdev->dev, "cannot get DMA channel.\n"); 1696 - ret = -EBUSY; 1697 1692 goto probe_free_gpio_wp; 1698 1693 } 1699 1694 }