diff options
author | Ian Abbott <abbotti@mev.co.uk> | 2017-02-17 11:09:10 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-06 09:16:58 +0100 |
commit | 800f35d773b038677fc7d6d0b2fc34a31005dd23 (patch) | |
tree | 2d3666a78f2b8b64f48e12b62b6c5022621d781c | |
parent | 8ec04a491825e08068e92bed0bba7821893b6433 (diff) |
staging: comedi: jr3_pci: Reset all DSPs
The various JR3 PCI models have from 1 to 4 DSPs, one per subdevice.
Prior to loading the firmware to all the DSPs, the initialization code
in `jr3_pci_auto_attach()` resets the first DSP. As far as I can tell,
it should reset all of them. Change it to do so.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/comedi/drivers/jr3_pci.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/comedi/drivers/jr3_pci.c b/drivers/staging/comedi/drivers/jr3_pci.c index eb0a095efe9c..c5bff9a85727 100644 --- a/drivers/staging/comedi/drivers/jr3_pci.c +++ b/drivers/staging/comedi/drivers/jr3_pci.c @@ -736,7 +736,8 @@ static int jr3_pci_auto_attach(struct comedi_device *dev, } /* Reset DSP card */ - writel(0, &devpriv->iobase->channel[0].reset); + for (i = 0; i < dev->n_subdevices; i++) + writel(0, &devpriv->iobase->channel[i].reset); ret = comedi_load_firmware(dev, &comedi_to_pci_dev(dev)->dev, "comedi/jr3pci.idm", |