staging: comedi: adl_pci9118: remove 'valid' from private data
This member of the private data is set only used during the (*detach) to check if the board can be reset. The pci9118_reset() function just needs a valid dev->iobase. Use that instead. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
b8546f93d9
commit
49b61195e5
|
@ -320,7 +320,6 @@ struct pci9118_private {
|
|||
unsigned char AdControlReg; /* A/D control register */
|
||||
unsigned char IntControlReg; /* Interrupt control register */
|
||||
unsigned char AdFunctionReg; /* A/D function register */
|
||||
char valid; /* driver is ok */
|
||||
char ai_neverending; /* we do unlimited AI */
|
||||
unsigned int ai_do; /* what do AI? 0=nothing, 1 to 4 mode */
|
||||
unsigned int ai_act_scan; /* how many scans we finished */
|
||||
|
@ -2044,7 +2043,6 @@ static int pci9118_common_attach(struct comedi_device *dev, int disable_irq,
|
|||
s->range_table = &range_digital;
|
||||
s->insn_bits = pci9118_insn_bits_do;
|
||||
|
||||
devpriv->valid = 1;
|
||||
devpriv->ai_maskharderr = 0x10a;
|
||||
/* default measure crash condition */
|
||||
if (hw_err_mask) /* disable some requested */
|
||||
|
@ -2121,7 +2119,7 @@ static void pci9118_detach(struct comedi_device *dev)
|
|||
struct pci9118_private *devpriv = dev->private;
|
||||
|
||||
if (devpriv) {
|
||||
if (devpriv->valid)
|
||||
if (dev->iobase)
|
||||
pci9118_reset(dev);
|
||||
if (dev->irq)
|
||||
free_irq(dev->irq, dev);
|
||||
|
|
Loading…
Reference in New Issue