All the comedi drivers that use memory mapped io currently have a
void __iomem * member in their private data for the driver. For
some of the drivers this is actually the only member in that data.

For convienence, add a new member to the comedi_device for this
void __iomem *.

Signed-off-by: H Hartley Sweeten <hswee...@visionengravers.com>
Cc: Ian Abbott <abbo...@mev.co.uk>
Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org>
---
 drivers/staging/comedi/comedidev.h | 1 +
 drivers/staging/comedi/drivers.c   | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/staging/comedi/comedidev.h 
b/drivers/staging/comedi/comedidev.h
index f3999f5..58e58a3 100644
--- a/drivers/staging/comedi/comedidev.h
+++ b/drivers/staging/comedi/comedidev.h
@@ -253,6 +253,7 @@ struct comedi_device {
        struct comedi_subdevice *subdevices;
 
        /* dumb */
+       void __iomem *mmio;
        unsigned long iobase;
        unsigned long iolen;
        unsigned int irq;
diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c
index 42ddf13..9ada130 100644
--- a/drivers/staging/comedi/drivers.c
+++ b/drivers/staging/comedi/drivers.c
@@ -121,6 +121,7 @@ static void comedi_device_detach_cleanup(struct 
comedi_device *dev)
        dev->driver = NULL;
        dev->board_name = NULL;
        dev->board_ptr = NULL;
+       dev->mmio = NULL;
        dev->iobase = 0;
        dev->iolen = 0;
        dev->ioenabled = false;
-- 
2.0.3

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to