diff options
author | H Hartley Sweeten | 2015-11-18 18:07:16 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2015-12-22 00:57:40 +0100 |
commit | 42100e306c0a33f56a079645148d6ceed17d2c40 (patch) | |
tree | 494c0f9fcaf6f84023f09780f31d09711035657e /drivers/staging/comedi | |
parent | staging: comedi: adv_pci_dio: remove board reset during (*detach) (diff) | |
download | kernel-qcow2-linux-42100e306c0a33f56a079645148d6ceed17d2c40.tar.gz kernel-qcow2-linux-42100e306c0a33f56a079645148d6ceed17d2c40.tar.xz kernel-qcow2-linux-42100e306c0a33f56a079645148d6ceed17d2c40.zip |
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: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi')
-rw-r--r-- | drivers/staging/comedi/drivers/adv_pci_dio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/comedi/drivers/adv_pci_dio.c b/drivers/staging/comedi/drivers/adv_pci_dio.c index 83591a6c3f93..55ca8f936dcd 100644 --- a/drivers/staging/comedi/drivers/adv_pci_dio.c +++ b/drivers/staging/comedi/drivers/adv_pci_dio.c @@ -471,6 +471,8 @@ static int pci_dio_auto_attach(struct comedi_device *dev, else dev->iobase = pci_resource_start(pcidev, 2); + pci_dio_reset(dev); + ret = comedi_alloc_subdevices(dev, board->nsubdevs); if (ret) return ret; @@ -543,8 +545,6 @@ static int pci_dio_auto_attach(struct comedi_device *dev, comedi_8254_subdevice_init(s, dev->pacer); } - pci_dio_reset(dev); - return 0; } |