]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
staging: comedi: ni_6527: iounmap resource when detached
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 29 Jul 2014 22:01:31 +0000 (15:01 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Jul 2014 23:55:15 +0000 (16:55 -0700)
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>
drivers/staging/comedi/drivers/ni_6527.c

index 6f9ca7ca124567b71f5d09b8de71f589004aac66..e84dac2bf3b27a54efd960e558242aa9e9aee4af 100644 (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);
 }