]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commit
staging: comedi: drivers: introduce comedi_legacy_detach()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 18 Apr 2013 21:31:29 +0000 (14:31 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 19 Apr 2013 18:19:52 +0000 (11:19 -0700)
commit316f97f169084c9a984d989d88ddce4eff60d749
treea744d6519a64966de565db77beade3599ef399aa
parent3a8d2ccdcff80c2a0aa2367cc4855c7f57e13a06
staging: comedi: drivers: introduce comedi_legacy_detach()

This function is intended to be used by the comedi legacy (ISA) drivers
either directly as the (*detach) function or as a helper in the drivers
private (*detach) function.

Modify the comedi_request_region() helper so that it stores the 'len' of
the region as well as the 'start' after the region has been successfuly
allocated by request_region() in __comedi_request_region(). This region
will then be automatically released detach of the driver by the
comedi_legacy_detach() helper.

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/comedidev.h
drivers/staging/comedi/drivers.c