Commit f6206f00 authored by Huang Shijie's avatar Huang Shijie Committed by Vinod Koul

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: default avatarHuang Shijie <sjhuang@iluvatar.ai>
Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent f39b948d
...@@ -470,11 +470,6 @@ static void mic_dma_chan_destroy(struct mic_dma_chan *ch) ...@@ -470,11 +470,6 @@ static void mic_dma_chan_destroy(struct mic_dma_chan *ch)
mic_dma_chan_mask_intr(ch); mic_dma_chan_mask_intr(ch);
} }
static void mic_dma_unregister_dma_device(struct mic_dma_device *mic_dma_dev)
{
dma_async_device_unregister(&mic_dma_dev->dma_dev);
}
static int mic_dma_setup_irq(struct mic_dma_chan *ch) static int mic_dma_setup_irq(struct mic_dma_chan *ch)
{ {
ch->cookie = ch->cookie =
...@@ -630,7 +625,7 @@ static int mic_dma_register_dma_device(struct mic_dma_device *mic_dma_dev, ...@@ -630,7 +625,7 @@ static int mic_dma_register_dma_device(struct mic_dma_device *mic_dma_dev,
list_add_tail(&mic_dma_dev->mic_ch[i].api_ch.device_node, list_add_tail(&mic_dma_dev->mic_ch[i].api_ch.device_node,
&mic_dma_dev->dma_dev.channels); &mic_dma_dev->dma_dev.channels);
} }
return dma_async_device_register(&mic_dma_dev->dma_dev); return dmaenginem_async_device_register(&mic_dma_dev->dma_dev);
} }
/* /*
...@@ -678,7 +673,6 @@ static struct mic_dma_device *mic_dma_dev_reg(struct mbus_device *mbdev, ...@@ -678,7 +673,6 @@ static struct mic_dma_device *mic_dma_dev_reg(struct mbus_device *mbdev,
static void mic_dma_dev_unreg(struct mic_dma_device *mic_dma_dev) static void mic_dma_dev_unreg(struct mic_dma_device *mic_dma_dev)
{ {
mic_dma_unregister_dma_device(mic_dma_dev);
mic_dma_uninit(mic_dma_dev); mic_dma_uninit(mic_dma_dev);
kfree(mic_dma_dev); kfree(mic_dma_dev);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment