Commit ae0e3b8b authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: addi-data: remove 'b_ValidDriver' from the private data

This variable is only used in the detach of the addi-data boards to
indicate that the attach of the board was successful and that the reset
function can be called. We can use the dev->iobase variable to indicate
this instead. Once this variable is set the attach always completes.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 34248192
...@@ -367,7 +367,6 @@ static int addi_attach_pci(struct comedi_device *dev, ...@@ -367,7 +367,6 @@ static int addi_attach_pci(struct comedi_device *dev,
} }
i_ADDI_Reset(dev); i_ADDI_Reset(dev);
devpriv->b_ValidDriver = 1;
return 0; return 0;
} }
...@@ -378,7 +377,7 @@ static void i_ADDI_Detach(struct comedi_device *dev) ...@@ -378,7 +377,7 @@ static void i_ADDI_Detach(struct comedi_device *dev)
struct addi_private *devpriv = dev->private; struct addi_private *devpriv = dev->private;
if (devpriv) { if (devpriv) {
if (devpriv->b_ValidDriver) if (dev->iobase)
i_ADDI_Reset(dev); i_ADDI_Reset(dev);
if (dev->irq) if (dev->irq)
free_irq(dev->irq, dev); free_irq(dev->irq, dev);
......
...@@ -312,7 +312,6 @@ struct addi_private { ...@@ -312,7 +312,6 @@ struct addi_private {
int i_IobaseAddon; /* addon base address */ int i_IobaseAddon; /* addon base address */
int i_IobaseReserved; int i_IobaseReserved;
void __iomem *dw_AiBase; void __iomem *dw_AiBase;
unsigned char b_ValidDriver; /* driver is ok */
unsigned char b_AiContinuous; /* we do unlimited AI */ unsigned char b_AiContinuous; /* we do unlimited AI */
unsigned char b_AiInitialisation; unsigned char b_AiInitialisation;
unsigned int ui_AiActualScan; /* how many scans we finished */ unsigned int ui_AiActualScan; /* how many scans we finished */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment