staging: comedi: ni_6527: iounmap resource when detached

PCI bar 1 is ioremap'ed during the (*auto_attach). This resource
needs to be iounmap'ed when the driver is (*detach)ed.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
H Hartley Sweeten 2014-07-29 15:01:31 -07:00 committed by Greg Kroah-Hartman
parent 53eeeaa6f7
commit c6f71be317

View file

@ -474,6 +474,8 @@ static void ni6527_detach(struct comedi_device *dev)
ni6527_reset(dev);
if (dev->irq)
free_irq(dev->irq, dev);
if (dev->mmio)
iounmap(dev->mmio);
comedi_pci_disable(dev);
}