lkml.org 
[lkml]   [2023]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v9 03/13] dmaengine: fsl-edma: clean up fsl_edma_irq_exit()
    On 20-06-23, 16:12, Frank Li wrote:
    > In the probe function, devm_request_irq is now being used to automatically
    > manage IRQ. It eliminates the need for manual IRQ freeing during removal.
    >
    > Signed-off-by: Frank Li <Frank.Li@nxp.com>
    > Reviewed-by: Peng Fan <peng.fan@nxp.com>
    > ---
    > drivers/dma/fsl-edma-main.c | 12 ------------
    > 1 file changed, 12 deletions(-)
    >
    > diff --git a/drivers/dma/fsl-edma-main.c b/drivers/dma/fsl-edma-main.c
    > index e40769666e39..16305bb9a2ef 100644
    > --- a/drivers/dma/fsl-edma-main.c
    > +++ b/drivers/dma/fsl-edma-main.c
    > @@ -216,17 +216,6 @@ fsl_edma2_irq_init(struct platform_device *pdev,
    > return 0;
    > }
    >
    > -static void fsl_edma_irq_exit(
    > - struct platform_device *pdev, struct fsl_edma_engine *fsl_edma)
    > -{
    > - if (fsl_edma->txirq == fsl_edma->errirq) {
    > - devm_free_irq(&pdev->dev, fsl_edma->txirq, fsl_edma);
    > - } else {
    > - devm_free_irq(&pdev->dev, fsl_edma->txirq, fsl_edma);
    > - devm_free_irq(&pdev->dev, fsl_edma->errirq, fsl_edma);
    > - }
    > -}
    > -
    > static void fsl_disable_clocks(struct fsl_edma_engine *fsl_edma, int nr_clocks)
    > {
    > int i;
    > @@ -427,7 +416,6 @@ static int fsl_edma_remove(struct platform_device *pdev)
    > struct device_node *np = pdev->dev.of_node;
    > struct fsl_edma_engine *fsl_edma = platform_get_drvdata(pdev);
    >
    > - fsl_edma_irq_exit(pdev, fsl_edma);

    I would not agree, this code is a failsafe to ensure that irq is quiesced
    and cant fire again while we are unrolling which also triggers a tasklet

    We are better of with this change

    > fsl_edma_cleanup_vchan(&fsl_edma->dma_dev);
    > of_dma_controller_free(np);
    > dma_async_device_unregister(&fsl_edma->dma_dev);
    > --
    > 2.34.1

    --
    ~Vinod

    \
     
     \ /
      Last update: 2023-07-07 07:41    [W:4.170 / U:0.040 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site