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

staging: comedi: adv_pci_dio: do board reset early in (*auto_attach)

The board reset function disables and clears all interrupts. It also
resets all the digital output channels to 0.

Interrupts are not currently used by this driver. For asthetics, do
the board reset early in the (*auto_attach) to make sure the interrupts
are disabled in case this feature is added.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4190c220
...@@ -471,6 +471,8 @@ static int pci_dio_auto_attach(struct comedi_device *dev, ...@@ -471,6 +471,8 @@ static int pci_dio_auto_attach(struct comedi_device *dev,
else else
dev->iobase = pci_resource_start(pcidev, 2); dev->iobase = pci_resource_start(pcidev, 2);
pci_dio_reset(dev);
ret = comedi_alloc_subdevices(dev, board->nsubdevs); ret = comedi_alloc_subdevices(dev, board->nsubdevs);
if (ret) if (ret)
return ret; return ret;
...@@ -543,8 +545,6 @@ static int pci_dio_auto_attach(struct comedi_device *dev, ...@@ -543,8 +545,6 @@ static int pci_dio_auto_attach(struct comedi_device *dev,
comedi_8254_subdevice_init(s, dev->pacer); comedi_8254_subdevice_init(s, dev->pacer);
} }
pci_dio_reset(dev);
return 0; return 0;
} }
......
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