lkml.org 
[lkml]   [2018]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 45/46] dmaengine: dma-axi-dmac: use dmaenginem_async_device_register to simplify the code
    Date
    Use dmaenginem_async_device_register to simplify the code:
    remove dma_async_device_unregister.
    remove label err_unregister_device

    Signed-off-by: Huang Shijie <sjhuang@iluvatar.ai>
    ---
    drivers/dma/dma-axi-dmac.c | 7 ++-----
    1 file changed, 2 insertions(+), 5 deletions(-)

    diff --git a/drivers/dma/dma-axi-dmac.c b/drivers/dma/dma-axi-dmac.c
    index 15b2453d2647..d510184762e6 100644
    --- a/drivers/dma/dma-axi-dmac.c
    +++ b/drivers/dma/dma-axi-dmac.c
    @@ -678,14 +678,14 @@ static int axi_dmac_probe(struct platform_device *pdev)

    axi_dmac_write(dmac, AXI_DMAC_REG_IRQ_MASK, 0x00);

    - ret = dma_async_device_register(dma_dev);
    + ret = dmaenginem_async_device_register(dma_dev);
    if (ret)
    goto err_clk_disable;

    ret = of_dma_controller_register(pdev->dev.of_node,
    of_dma_xlate_by_chan_id, dma_dev);
    if (ret)
    - goto err_unregister_device;
    + goto err_clk_disable;

    ret = request_irq(dmac->irq, axi_dmac_interrupt_handler, IRQF_SHARED,
    dev_name(&pdev->dev), dmac);
    @@ -698,8 +698,6 @@ static int axi_dmac_probe(struct platform_device *pdev)

    err_unregister_of:
    of_dma_controller_free(pdev->dev.of_node);
    -err_unregister_device:
    - dma_async_device_unregister(&dmac->dma_dev);
    err_clk_disable:
    clk_disable_unprepare(dmac->clk);

    @@ -713,7 +711,6 @@ static int axi_dmac_remove(struct platform_device *pdev)
    of_dma_controller_free(pdev->dev.of_node);
    free_irq(dmac->irq, dmac);
    tasklet_kill(&dmac->chan.vchan.task);
    - dma_async_device_unregister(&dmac->dma_dev);
    clk_disable_unprepare(dmac->clk);

    return 0;
    --
    2.17.1
    \
     
     \ /
      Last update: 2018-08-03 09:23    [W:4.257 / U:0.224 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site