Skip to content

Commit

Permalink
staging: comedi: skel: use comedi_legacy_detach()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Apr 19, 2013
1 parent 60cb3b0 commit 3fd1971
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions drivers/staging/comedi/drivers/skel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 3fd1971

Please sign in to comment.