Patch from Ian Abbot <abbotti@mev.co.uk>:
I've done some work on getting rid of the check_region calls which are now
deprecated.
I first mentioned this back in March and did a little bit of work on it at the time:
https://cvs.comedi.org/pipermail/comedi/2005-March/006971.html
https://cvs.comedi.org/pipermail/comedi/2005-March/006977.html
My new patch seems to be too large for the comedi mailing list - they just
disappear into a black hole, so here is a description of my latest patch:
I used a static inline function called compat__request_region and (re)defined a
macro called request_region to use it. The result is that drivers can check the
return value of request_region (or pci_request_regions) instead of calling
check_region. Note that the compat__request_region does not return a pointer to
anything real, but it can be compared to NULL.
The attached patch implements the above compatibility stuff and changes the
drivers to use it (but I changed the amplc_pci230 driver to use
pci_request_regions instead of request_region while I was at it). I've also
changed the compatibility version of pci_request_regions to avoid calling
check_regions (otherwise it would be called twice) and also made it release any
regions it successfully requested on failure.
Most of the changes to the individual drivers were straightforward. One or two
required a modicum of thought to release resources on error.
45 files changed: