aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/dma/dmatest.c4
-rw-r--r--include/linux/dmaengine.h5
2 files changed, 6 insertions, 3 deletions
diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
index 3a8047b1f108..99a75e5d66be 100644
--- a/drivers/dma/dmatest.c
+++ b/drivers/dma/dmatest.c
@@ -536,7 +536,7 @@ err_srcs:
536 thread_name, total_tests, failed_tests, ret); 536 thread_name, total_tests, failed_tests, ret);
537 537
538 /* terminate all transfers on specified channels */ 538 /* terminate all transfers on specified channels */
539 chan->device->device_control(chan, DMA_TERMINATE_ALL, 0); 539 dmaengine_terminate_all(chan);
540 if (iterations > 0) 540 if (iterations > 0)
541 while (!kthread_should_stop()) { 541 while (!kthread_should_stop()) {
542 DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wait_dmatest_exit); 542 DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wait_dmatest_exit);
@@ -561,7 +561,7 @@ static void dmatest_cleanup_channel(struct dmatest_chan *dtc)
561 } 561 }
562 562
563 /* terminate all transfers on specified channels */ 563 /* terminate all transfers on specified channels */
564 dtc->chan->device->device_control(dtc->chan, DMA_TERMINATE_ALL, 0); 564 dmaengine_terminate_all(dtc->chan);
565 565
566 kfree(dtc); 566 kfree(dtc);
567} 567}
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 3aa76dbed166..be6e95395b11 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -608,7 +608,10 @@ static inline int dmaengine_device_control(struct dma_chan *chan,
608 enum dma_ctrl_cmd cmd, 608 enum dma_ctrl_cmd cmd,
609 unsigned long arg) 609 unsigned long arg)
610{ 610{
611 return chan->device->device_control(chan, cmd, arg); 611 if (chan->device->device_control)
612 return chan->device->device_control(chan, cmd, arg);
613 else
614 return -ENOSYS;
612} 615}
613 616
614static inline int dmaengine_slave_config(struct dma_chan *chan, 617static inline int dmaengine_slave_config(struct dma_chan *chan,