diff options
Diffstat (limited to 'drivers/mmc/host/dw_mmc.c')
-rw-r--r-- | drivers/mmc/host/dw_mmc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index bf3c9b456aaf..ab3fc4617107 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c | |||
@@ -526,8 +526,10 @@ static int dw_mci_submit_data_dma(struct dw_mci *host, struct mmc_data *data) | |||
526 | return -ENODEV; | 526 | return -ENODEV; |
527 | 527 | ||
528 | sg_len = dw_mci_pre_dma_transfer(host, data, 0); | 528 | sg_len = dw_mci_pre_dma_transfer(host, data, 0); |
529 | if (sg_len < 0) | 529 | if (sg_len < 0) { |
530 | host->dma_ops->stop(host); | ||
530 | return sg_len; | 531 | return sg_len; |
532 | } | ||
531 | 533 | ||
532 | host->using_dma = 1; | 534 | host->using_dma = 1; |
533 | 535 | ||
@@ -1879,7 +1881,8 @@ static void dw_mci_init_dma(struct dw_mci *host) | |||
1879 | if (!host->dma_ops) | 1881 | if (!host->dma_ops) |
1880 | goto no_dma; | 1882 | goto no_dma; |
1881 | 1883 | ||
1882 | if (host->dma_ops->init) { | 1884 | if (host->dma_ops->init && host->dma_ops->start && |
1885 | host->dma_ops->stop && host->dma_ops->cleanup) { | ||
1883 | if (host->dma_ops->init(host)) { | 1886 | if (host->dma_ops->init(host)) { |
1884 | dev_err(&host->dev, "%s: Unable to initialize " | 1887 | dev_err(&host->dev, "%s: Unable to initialize " |
1885 | "DMA Controller.\n", __func__); | 1888 | "DMA Controller.\n", __func__); |