staging: comedi: das1800: use comedi_legacy_detach()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 18 Apr 2013 21:33:04 +0000 (14:33 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 19 Apr 2013 18:19:53 +0000 (11:19 -0700)
commite608796ab624049419e987be32f81ab08486c7ba
tree1b864e07662a4c26263ffeb78e772cf7b165253c
parent4b3fb0ff745582e2381945dc56f8f1b3e4a2c9c3
staging: comedi: das1800: use comedi_legacy_detach()

Use the new comedi_legacy_detach() helper in the (*detach) to release
the first I/O region requested by this driver.

An additional I/O region is requested for some of the boards this driver
supports. The iobase for that region is stored in the private data so
that the (*detach) knows it needs to be released. Remove the extra
cleanup in the (*attach) that releases the first region.

For aesthetics, move the release of the additional region in the
(*detach) so it follows the (*attach) order.

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/das1800.c