* [PATCH] staging: comedi: dt282x: release irq on dt282x detach
@ 2017-10-06 16:36 Arvind Yadav
2017-10-06 17:21 ` arvindY
0 siblings, 1 reply; 2+ messages in thread
From: Arvind Yadav @ 2017-10-06 16:36 UTC (permalink / raw)
To: abbotti, hsweeten, gregkh; +Cc: devel, linux-kernel
free_irq() should be called on driver 'dt282x' detach.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/staging/comedi/drivers/dt282x.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/staging/comedi/drivers/dt282x.c b/drivers/staging/comedi/drivers/dt282x.c
index d5295bb..a132f60 100644
--- a/drivers/staging/comedi/drivers/dt282x.c
+++ b/drivers/staging/comedi/drivers/dt282x.c
@@ -1057,6 +1057,8 @@ static void dt282x_alloc_dma(struct comedi_device *dev,
if (request_irq(irq_num, dt282x_interrupt, 0, dev->board_name, dev))
return;
+ dev->irq = irq_num;
+
/* DMA uses two 4K buffers with separate DMA channels */
devpriv->dma = comedi_isadma_alloc(dev, 2, dma_chan[0], dma_chan[1],
PAGE_SIZE, 0);
@@ -1070,6 +1072,9 @@ static void dt282x_free_dma(struct comedi_device *dev)
if (devpriv)
comedi_isadma_free(devpriv->dma);
+
+ if (dev->irq)
+ free_irq(dev->irq, dev);
}
static int dt282x_initialize(struct comedi_device *dev)
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: comedi: dt282x: release irq on dt282x detach
2017-10-06 16:36 [PATCH] staging: comedi: dt282x: release irq on dt282x detach Arvind Yadav
@ 2017-10-06 17:21 ` arvindY
0 siblings, 0 replies; 2+ messages in thread
From: arvindY @ 2017-10-06 17:21 UTC (permalink / raw)
To: abbotti, hsweeten, gregkh; +Cc: devel, linux-kernel
Sorry for noise, ignore this patch.
On Friday 06 October 2017 10:06 PM, Arvind Yadav wrote:
> free_irq() should be called on driver 'dt282x' detach.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
> drivers/staging/comedi/drivers/dt282x.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/staging/comedi/drivers/dt282x.c b/drivers/staging/comedi/drivers/dt282x.c
> index d5295bb..a132f60 100644
> --- a/drivers/staging/comedi/drivers/dt282x.c
> +++ b/drivers/staging/comedi/drivers/dt282x.c
> @@ -1057,6 +1057,8 @@ static void dt282x_alloc_dma(struct comedi_device *dev,
> if (request_irq(irq_num, dt282x_interrupt, 0, dev->board_name, dev))
> return;
>
> + dev->irq = irq_num;
> +
> /* DMA uses two 4K buffers with separate DMA channels */
> devpriv->dma = comedi_isadma_alloc(dev, 2, dma_chan[0], dma_chan[1],
> PAGE_SIZE, 0);
> @@ -1070,6 +1072,9 @@ static void dt282x_free_dma(struct comedi_device *dev)
>
> if (devpriv)
> comedi_isadma_free(devpriv->dma);
> +
> + if (dev->irq)
> + free_irq(dev->irq, dev);
> }
>
> static int dt282x_initialize(struct comedi_device *dev)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-06 17:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-06 16:36 [PATCH] staging: comedi: dt282x: release irq on dt282x detach Arvind Yadav
2017-10-06 17:21 ` arvindY
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.