Skip to content

Commit 19cbb8f

Browse files
bigguinessgregkh
authored andcommitted
staging: comedi: adv_pci1710: don't "reset" board when detaching
Currently this driver calls pci1710_reset() during the (*detach) of the driver. That function does the following: 1) program the control register to stop any operations 2) clears the analog input FIFO 3) clears any pending interrupts 4) sets all the analog output channels to unipolar 5V range and 0V output 5) sets all the digital outputs to 0V Before detaching the comedi core will (*cancel) any running async commands. This will handle 1-3 above. Depending on the application, it might not be safe to reset the analog and digital outputs when the driver is detached. Remove the board reset when detaching and just use comedi_pci_detach() directly for the driver (*detach). Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 8a8d087 commit 19cbb8f

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

drivers/staging/comedi/drivers/adv_pci1710.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -882,18 +882,11 @@ static int pci1710_auto_attach(struct comedi_device *dev,
882882
return 0;
883883
}
884884

885-
static void pci1710_detach(struct comedi_device *dev)
886-
{
887-
if (dev->iobase)
888-
pci1710_reset(dev);
889-
comedi_pci_detach(dev);
890-
}
891-
892885
static struct comedi_driver adv_pci1710_driver = {
893886
.driver_name = "adv_pci1710",
894887
.module = THIS_MODULE,
895888
.auto_attach = pci1710_auto_attach,
896-
.detach = pci1710_detach,
889+
.detach = comedi_pci_detach,
897890
};
898891

899892
static int adv_pci1710_pci_probe(struct pci_dev *dev,

0 commit comments

Comments
 (0)