staging: comedi: dt282x: fix IRQ assignment for dev->irq.
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Fri, 6 Oct 2017 18:25:56 +0000 (23:55 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Oct 2017 13:45:48 +0000 (15:45 +0200)
Here, dev->irq is not assigned with irq. comedi_legacy_detach()
is using dev->irq for release irq and dt282x_attach() is using dev->irq
for initialize comedi_subdevice.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/dt282x.c

index d5295bbdd28c4223dea0a2acbf900e47781eeb47..217a4b884689c436e883fafcd96512a730fa6b89 100644 (file)
@@ -1062,6 +1062,8 @@ static void dt282x_alloc_dma(struct comedi_device *dev,
                                           PAGE_SIZE, 0);
        if (!devpriv->dma)
                free_irq(irq_num, dev);
+       else
+               dev->irq = irq_num;
 }
 
 static void dt282x_free_dma(struct comedi_device *dev)