staging: comedi: remove unneeded settings of `dev->iobase`
authorIan Abbott <abbotti@mev.co.uk>
Fri, 15 Mar 2013 13:15:36 +0000 (13:15 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Mar 2013 16:16:31 +0000 (09:16 -0700)
Some PCI drivers use the "spare" `iobase` member of `struct
comedi_device` as a flag to indicate that the call to
`comedi_pci_enable()` was successful.  This is no longer necessary now
that `comedi_pci_enable()` and `comedi_pci_disable()` use the
`ioenabled` member of `struct comedi_device` themselves to keep track of
what needs to be done.

Remove the unnecessary assignments to the `iobase` member in the
relevant drivers.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
15 files changed:
drivers/staging/comedi/drivers/cb_pcidas.c
drivers/staging/comedi/drivers/daqboard2000.c
drivers/staging/comedi/drivers/dt3000.c
drivers/staging/comedi/drivers/gsc_hpdi.c
drivers/staging/comedi/drivers/jr3_pci.c
drivers/staging/comedi/drivers/me_daq.c
drivers/staging/comedi/drivers/ni_6527.c
drivers/staging/comedi/drivers/ni_65xx.c
drivers/staging/comedi/drivers/ni_660x.c
drivers/staging/comedi/drivers/ni_670x.c
drivers/staging/comedi/drivers/ni_labpc.c
drivers/staging/comedi/drivers/ni_pcidio.c
drivers/staging/comedi/drivers/ni_pcimio.c
drivers/staging/comedi/drivers/rtd520.c
drivers/staging/comedi/drivers/s626.c

index c19e4b2004f8b6dce992bf7f7e8562c7e8eb1875..cdbeb0833d0b8e8e4aad86248c8972326b6732de 100644 (file)
@@ -1458,7 +1458,6 @@ static int cb_pcidas_auto_attach(struct comedi_device *dev,
        ret = comedi_pci_enable(dev);
        if (ret)
                return ret;
-       dev->iobase = 1;
 
        devpriv->s5933_config = pci_resource_start(pcidev, 0);
        devpriv->control_status = pci_resource_start(pcidev, 1);
index 7c549eb442f89491b9a8ab8fe6ea716e40e0d2f3..a0ec8bd5c01d32d725db63bea3f966b9156ae80f 100644 (file)
@@ -712,7 +712,6 @@ static int daqboard2000_auto_attach(struct comedi_device *dev,
        result = comedi_pci_enable(dev);
        if (result)
                return result;
-       dev->iobase = 1;        /* the "detach" needs this */
 
        devpriv->plx = ioremap(pci_resource_start(pcidev, 0),
                               pci_resource_len(pcidev, 0));
index edbcd89aff9d67f945204c8babd11c8902d5804a..909656ba51b526fa8e9217361d445df9e0d352dc 100644 (file)
@@ -738,7 +738,6 @@ static int dt3000_auto_attach(struct comedi_device *dev,
        ret = comedi_pci_enable(dev);
        if (ret < 0)
                return ret;
-       dev->iobase = 1;        /* the "detach" needs this */
 
        pci_base  = pci_resource_start(pcidev, 0);
        devpriv->io_addr = ioremap(pci_base, DT3000_SIZE);
index 16b4cc050d3537776b98409850b97a609a18fb09..ba44d0375c20b5fd4dae62d8070771eec4c6d78f 100644 (file)
@@ -502,7 +502,6 @@ static int hpdi_auto_attach(struct comedi_device *dev,
        retval = comedi_pci_enable(dev);
        if (retval)
                return retval;
-       dev->iobase = 1;        /* the "detach" needs this */
        pci_set_master(pcidev);
 
        devpriv->plx9080_iobase =
index 36659e500f40d8d7bcaa8debd481553a33db577d..f21ebb536a2d8fb97be68bd03510a6347cc3fab9 100644 (file)
@@ -705,7 +705,6 @@ static int jr3_pci_auto_attach(struct comedi_device *dev,
        result = comedi_pci_enable(dev);
        if (result)
                return result;
-       dev->iobase = 1;        /* the "detach" needs this */
 
        devpriv->iobase = ioremap(pci_resource_start(pcidev, 0),
                                  offsetof(struct jr3_t,
index fbbac1259ebd0d70e9486942d5a47718ae27a65a..5df4f55dbaead65fe476e98c2c71d6c54edfa753 100644 (file)
@@ -514,7 +514,6 @@ static int me_auto_attach(struct comedi_device *dev,
        ret = comedi_pci_enable(dev);
        if (ret)
                return ret;
-       dev->iobase = 1;        /* detach needs this */
 
        dev_private->plx_regbase = ioremap(pci_resource_start(pcidev, 0),
                                           pci_resource_len(pcidev, 0));
index 65dd1c68721a1f996ff795c469dfdf4a36882bf4..d10f777b7f179f5da2e540dbc39d0008b3a0c024 100644 (file)
@@ -339,7 +339,6 @@ static int ni6527_auto_attach(struct comedi_device *dev,
        ret = comedi_pci_enable(dev);
        if (ret)
                return ret;
-       dev->iobase = 1;
 
        devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL);
        if (!devpriv)
index eec712e5e1387272c7bd2d481277249948d7be13..013392cfe2a1abe84d2b442e92faa85cd8dea455 100644 (file)
@@ -603,7 +603,6 @@ static int ni_65xx_auto_attach(struct comedi_device *dev,
        ret = comedi_pci_enable(dev);
        if (ret)
                return ret;
-       dev->iobase = 1;
 
        devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL);
        if (!devpriv)
index 440cfd17ee3aa6bc1d933dc0bba0d31c1bc16eef..5cdda7fe97a71fd463ff8d04aeaf5ca1ac826f56 100644 (file)
@@ -1180,7 +1180,6 @@ static int ni_660x_auto_attach(struct comedi_device *dev,
        ret = comedi_pci_enable(dev);
        if (ret)
                return ret;
-       dev->iobase = 1;
 
        ret = ni_660x_allocate_private(dev);
        if (ret < 0)
index 524f6cd7268754c00d42397010a5897570a6e47d..e9d486238c85e92e1c119c0979bb6a9d21bcb060 100644 (file)
@@ -211,7 +211,6 @@ static int ni_670x_auto_attach(struct comedi_device *dev,
        ret = comedi_pci_enable(dev);
        if (ret)
                return ret;
-       dev->iobase = 1;
 
        devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL);
        if (!devpriv)
index d2edaad4ddbecaad0b407c9c0c31413f1a2afc40..62ec39dea97dddfa134eacec3eb13506b97467bf 100644 (file)
@@ -711,7 +711,6 @@ static int labpc_auto_attach(struct comedi_device *dev,
        ret = comedi_pci_enable(dev);
        if (ret)
                return ret;
-       dev->iobase = 1;
 
        devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL);
        if (!devpriv)
index 3e3a03c49681c10a12d370357d4f4b6d1ce00732..b5f340c186ec74e839d894288e02b96803d8e1b9 100644 (file)
@@ -1115,7 +1115,6 @@ static int nidio_auto_attach(struct comedi_device *dev,
        ret = comedi_pci_enable(dev);
        if (ret)
                return ret;
-       dev->iobase = 1;
 
        devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL);
        if (!devpriv)
index 098c398f2bea6f78114999a5c5b1510a3923cdea..bc83df53872e13c34c58dac45e8624a539b1f25c 100644 (file)
@@ -1491,7 +1491,6 @@ static int pcimio_auto_attach(struct comedi_device *dev,
        ret = comedi_pci_enable(dev);
        if (ret)
                return ret;
-       dev->iobase = 1;
 
        ret = ni_alloc_private(dev);
        if (ret)
index c0935d4a89c1b27a88bbb5a0d477da7b7bcc38b4..b1d888eb61f7bf4f8fbeb420cd140f6f948cb7fd 100644 (file)
@@ -1286,7 +1286,6 @@ static int rtd_auto_attach(struct comedi_device *dev,
        ret = comedi_pci_enable(dev);
        if (ret)
                return ret;
-       dev->iobase = 1;        /* the "detach" needs this */
 
        devpriv->las0 = ioremap_nocache(pci_resource_start(pcidev, 2),
                                        pci_resource_len(pcidev, 2));
index d1560524fc14c83ef6d03ac04d902ac3621d7116..7d009463b92d3d17cba320a3fbf7be50acdf99fd 100644 (file)
@@ -2676,7 +2676,6 @@ static int s626_auto_attach(struct comedi_device *dev,
        ret = comedi_pci_enable(dev);
        if (ret)
                return ret;
-       dev->iobase = 1;        /* detach needs this */
 
        devpriv->base_addr = ioremap(pci_resource_start(pcidev, 0),
                                     pci_resource_len(pcidev, 0));