summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi/comedidev.h
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2013-03-15 13:15:35 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-15 16:16:31 (GMT)
commit00ca6884186f18a758eae37e94f7c3c0527f8f30 (patch)
tree69190496dd4ac8e099a2cd0cf0b21d19551cbab9 /drivers/staging/comedi/comedidev.h
parent13f12b5aea501bce146cdf213d1819083aadc847 (diff)
downloadlinux-fsl-qoriq-00ca6884186f18a758eae37e94f7c3c0527f8f30.tar.xz
staging: comedi: add 'ioenabled' flag to device
Add 1-bit bit-field member `ioenabled` of type `bool` to `struct comedi_device`. Use this to keep track of whether a PCI device and its BARs have been successfully enabled by `comedi_pci_enable()`. This avoids overloading the meaning of the `iobase` member which is used by several drivers to hold the base port I/O address of a board's "main" registers. Other drivers using MMIO use `iobase` as a flag to indicate that the preceding call to `comedi_pci_enable()` was successful. They no longer need to do that. The name `ioenabled` is intended to be PCI-agnostic so it can be used for similar purposes by non-PCI drivers. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/comedidev.h')
-rw-r--r--drivers/staging/comedi/comedidev.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h
index 86de4ff..9c8662a 100644
--- a/drivers/staging/comedi/comedidev.h
+++ b/drivers/staging/comedi/comedidev.h
@@ -209,6 +209,7 @@ struct comedi_device {
const void *board_ptr;
bool attached:1;
bool in_request_module:1;
+ bool ioenabled:1;
spinlock_t spinlock;
struct mutex mutex;