From 49b61195e5b5fd7884a3bddab43a2e53983988c7 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Mon, 5 May 2014 09:35:40 -0700 Subject: 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 Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adl_pci9118.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/adl_pci9118.c b/drivers/staging/comedi/drivers/adl_pci9118.c index dd1cd6be66ec..f60dc41756e2 100644 --- a/drivers/staging/comedi/drivers/adl_pci9118.c +++ b/drivers/staging/comedi/drivers/adl_pci9118.c @@ -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); -- cgit v1.2.3