Use comedi_pci_detach() to handle the boilerplate part of the (*detach) for this PCI driver. Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx> Cc: Ian Abbott <abbotti@xxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/staging/comedi/drivers/daqboard2000.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/staging/comedi/drivers/daqboard2000.c b/drivers/staging/comedi/drivers/daqboard2000.c index bbfc1e1..ac9f83c 100644 --- a/drivers/staging/comedi/drivers/daqboard2000.c +++ b/drivers/staging/comedi/drivers/daqboard2000.c @@ -755,13 +755,9 @@ static void daqboard2000_detach(struct comedi_device *dev) { struct daqboard2000_private *devpriv = dev->private; - if (devpriv) { - if (dev->mmio) - iounmap(dev->mmio); - if (devpriv->plx) - iounmap(devpriv->plx); - } - comedi_pci_disable(dev); + if (devpriv && devpriv->plx) + iounmap(devpriv->plx); + comedi_pci_detach(dev); } static struct comedi_driver daqboard2000_driver = { -- 2.0.3 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel