aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHuang Shijie <sjhuang@iluvatar.ai>2018-07-26 02:45:54 -0400
committerVinod Koul <vkoul@kernel.org>2018-07-30 01:20:22 -0400
commitf6206f00d8c55a1beba9a4be96939353e632f939 (patch)
tree6461a89b578b3e6a3556b470f5b9a741793c7161
parentf39b948dbeaf9da0dfd17e68704f38fe4237788f (diff)
dmaengine: mic_x100_dma: use the new helper to simplify the code
Use dmaenginem_async_device_register() to simplify the code: remove the mic_dma_unregister_dma_device() Signed-off-by: Huang Shijie <sjhuang@iluvatar.ai> Signed-off-by: Vinod Koul <vkoul@kernel.org>
-rw-r--r--drivers/dma/mic_x100_dma.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/dma/mic_x100_dma.c b/drivers/dma/mic_x100_dma.c
index 68dd79783b54..b76cb17d879c 100644
--- a/drivers/dma/mic_x100_dma.c
+++ b/drivers/dma/mic_x100_dma.c
@@ -470,11 +470,6 @@ static void mic_dma_chan_destroy(struct mic_dma_chan *ch)
470 mic_dma_chan_mask_intr(ch); 470 mic_dma_chan_mask_intr(ch);
471} 471}
472 472
473static void mic_dma_unregister_dma_device(struct mic_dma_device *mic_dma_dev)
474{
475 dma_async_device_unregister(&mic_dma_dev->dma_dev);
476}
477
478static int mic_dma_setup_irq(struct mic_dma_chan *ch) 473static int mic_dma_setup_irq(struct mic_dma_chan *ch)
479{ 474{
480 ch->cookie = 475 ch->cookie =
@@ -630,7 +625,7 @@ static int mic_dma_register_dma_device(struct mic_dma_device *mic_dma_dev,
630 list_add_tail(&mic_dma_dev->mic_ch[i].api_ch.device_node, 625 list_add_tail(&mic_dma_dev->mic_ch[i].api_ch.device_node,
631 &mic_dma_dev->dma_dev.channels); 626 &mic_dma_dev->dma_dev.channels);
632 } 627 }
633 return dma_async_device_register(&mic_dma_dev->dma_dev); 628 return dmaenginem_async_device_register(&mic_dma_dev->dma_dev);
634} 629}
635 630
636/* 631/*
@@ -678,7 +673,6 @@ alloc_error:
678 673
679static void mic_dma_dev_unreg(struct mic_dma_device *mic_dma_dev) 674static void mic_dma_dev_unreg(struct mic_dma_device *mic_dma_dev)
680{ 675{
681 mic_dma_unregister_dma_device(mic_dma_dev);
682 mic_dma_uninit(mic_dma_dev); 676 mic_dma_uninit(mic_dma_dev);
683 kfree(mic_dma_dev); 677 kfree(mic_dma_dev);
684} 678}