Rather than overloading the semantics of the `iobase` member of `struct comedi_device` to indicate whether a call to `comedi_pci_enable()` was successful or not, introduce a new member `ioenabled` for this purpose, managed by `comedi_pci_enable()` and `comedi_pci_disable()` themselves (patch 3). This allows some unneeded settings of the `iobase` member to be removed from a few drivers (patch 4). To save a few bytes in `struct comedi_device`, change some members of type `int` used as boolean flags to 1-bit bit-fields of type `bool` (patches 1 and 2). 1) staging: comedi: make 'dev->attached' a bool bit-field 2) staging: comedi: make 'in_request_module' a bool bit-field 3) staging: comedi: add 'ioenabled' flag to device 4) staging: comedi: remove unneeded settings of `dev->iobase` Patch 3 may conflict with H Hartley Sweeten's work a little. drivers/staging/comedi/comedi_fops.c | 12 ++++++------ drivers/staging/comedi/comedi_pci.c | 5 ++++- drivers/staging/comedi/comedidev.h | 5 +++-- drivers/staging/comedi/drivers.c | 5 +++-- drivers/staging/comedi/drivers/cb_pcidas.c | 3 +-- drivers/staging/comedi/drivers/cb_pcidas64.c | 2 +- drivers/staging/comedi/drivers/daqboard2000.c | 1 - drivers/staging/comedi/drivers/das16.c | 2 +- drivers/staging/comedi/drivers/das16m1.c | 2 +- drivers/staging/comedi/drivers/das1800.c | 2 +- drivers/staging/comedi/drivers/dt3000.c | 1 - drivers/staging/comedi/drivers/gsc_hpdi.c | 1 - drivers/staging/comedi/drivers/jr3_pci.c | 1 - drivers/staging/comedi/drivers/me_daq.c | 1 - drivers/staging/comedi/drivers/ni_6527.c | 1 - drivers/staging/comedi/drivers/ni_65xx.c | 1 - drivers/staging/comedi/drivers/ni_660x.c | 3 +-- drivers/staging/comedi/drivers/ni_670x.c | 1 - drivers/staging/comedi/drivers/ni_at_a2150.c | 2 +- drivers/staging/comedi/drivers/ni_labpc.c | 3 +-- drivers/staging/comedi/drivers/ni_mio_common.c | 2 +- drivers/staging/comedi/drivers/ni_pcidio.c | 3 +-- drivers/staging/comedi/drivers/ni_pcimio.c | 1 - drivers/staging/comedi/drivers/rtd520.c | 1 - drivers/staging/comedi/drivers/s626.c | 3 +-- 25 files changed, 27 insertions(+), 37 deletions(-) _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel