From: Ian Abbott Date: Wed, 24 Oct 2012 15:48:01 +0000 (+0100) Subject: staging: comedi: amplc_dio200: support memory-mapped I/O X-Git-Tag: omap-for-v3.8/fixes-for-merge-window-v4-signed~84^2~1018 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71b3e9e8dc218133417d3c167632a61f9fed3651;p=pandora-kernel.git staging: comedi: amplc_dio200: support memory-mapped I/O The boards currently supported by this module all use port I/O. Support memory-mapped I/O as well for future PCI/PCIe cards. Define `struct dio200_region` to hold the type of register access and either the port I/O base address or an ioremapped MMIO address. Add a member `io` to the comedi device private data (`struct dio200_private`) to hold this. Use this instead of `dev->iobase`. Memory-mapped registers are mapped in `dio200_pci_attach()` and unmapped in `dio200_detach()`. `dio200_detach()` now uses the private data pointer `devpriv` set to `dev->private` but can return early if it is `NULL` because no clean-up needs to be done in that case. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed