summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH Hartley Sweeten2013-04-18 23:34:00 +0200
committerGreg Kroah-Hartman2013-04-19 20:19:54 +0200
commit3fd19714e3b7b355cb52975edaeb25df6db4a9be (patch)
treedc6c3be7aa9199b57df059a1fe1e188c7003a0cc
parentstaging: comedi: amplc_dio200: use comedi_legacy_detach() (diff)
downloadkernel-qcow2-linux-3fd19714e3b7b355cb52975edaeb25df6db4a9be.tar.gz
kernel-qcow2-linux-3fd19714e3b7b355cb52975edaeb25df6db4a9be.tar.xz
kernel-qcow2-linux-3fd19714e3b7b355cb52975edaeb25df6db4a9be.zip
staging: comedi: skel: use comedi_legacy_detach()
Update the skeleton driver to use the new comedi_legacy_detach() helper in the (*detach) to release the I/O region. Also, update the comment about it. 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>
-rw-r--r--drivers/staging/comedi/drivers/skel.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/staging/comedi/drivers/skel.c b/drivers/staging/comedi/drivers/skel.c
index 6dc77fc07220..dbc8c54d6da7 100644
--- a/drivers/staging/comedi/drivers/skel.c
+++ b/drivers/staging/comedi/drivers/skel.c
@@ -632,11 +632,12 @@ static void skel_detach(struct comedi_device *dev)
/*
* ISA board
*
- * If I/O regions successfully requested by _attach(),
- * release them here.
+ * Release the first I/O region requested during the
+ * _attach(). This is safe to call even if the request
+ * failed. If any additional I/O regions are requested
+ * they need to be released by the driver.
*/
- if (dev->iobase)
- release_region(dev->iobase, SKEL_SIZE);
+ comedi_legacy_detach(dev);
}
}