Patch from Ian Abbot <abbotti@mev.co.uk>:
authorFrank Mori Hess <fmhess@speakeasy.net>
Sat, 4 Jun 2005 14:32:48 +0000 (14:32 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Sat, 4 Jun 2005 14:32:48 +0000 (14:32 +0000)
commit78f34fae84cee787d48a313193225d034d3c7565
treedb61c2122c59d5508de529db5576e8a5efe466cb
parent9cd30c2f54d22a2dc8179feebd35507805df8034
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:
comedi/drivers/8255.c
comedi/drivers/acl7225b.c
comedi/drivers/adl_pci6208.c
comedi/drivers/adl_pci9118.c
comedi/drivers/adv_pci1710.c
comedi/drivers/amplc_dio200.c
comedi/drivers/amplc_pc236.c
comedi/drivers/amplc_pc263.c
comedi/drivers/amplc_pci230.c
comedi/drivers/cb_pcidas.c
comedi/drivers/comedi_parport.c
comedi/drivers/das08.c
comedi/drivers/das16.c
comedi/drivers/das16m1.c
comedi/drivers/das1800.c
comedi/drivers/das6402.c
comedi/drivers/das800.c
comedi/drivers/dt2801.c
comedi/drivers/dt2811.c
comedi/drivers/dt2814.c
comedi/drivers/dt2815.c
comedi/drivers/dt2817.c
comedi/drivers/dt282x.c
comedi/drivers/fl512.c
comedi/drivers/multiq3.c
comedi/drivers/ni_at_a2150.c
comedi/drivers/ni_at_ao.c
comedi/drivers/ni_atmio.c
comedi/drivers/ni_atmio16d.c
comedi/drivers/ni_labpc.c
comedi/drivers/pcl711.c
comedi/drivers/pcl724.c
comedi/drivers/pcl725.c
comedi/drivers/pcl726.c
comedi/drivers/pcl730.c
comedi/drivers/pcl812.c
comedi/drivers/pcl816.c
comedi/drivers/pcl818.c
comedi/drivers/pcm3730.c
comedi/drivers/pcmad.c
comedi/drivers/poc.c
comedi/drivers/rti800.c
comedi/drivers/rti802.c
include/linux/ioport.h
include/linux/pci.h