[PATCH 20/22] staging: comedi: addi_apci_3120: reset the board before hooking up the interrupt

H Hartley Sweeten hsweeten at visionengravers.com
Mon Oct 20 18:34:27 UTC 2014


Move the apci3120_reset() call in the (*auto_attach) to ensure that the board
is reset before hooking up the interrupt.

Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
Cc: Ian Abbott <abbotti at mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
---
 drivers/staging/comedi/drivers/addi_apci_3120.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers/addi_apci_3120.c b/drivers/staging/comedi/drivers/addi_apci_3120.c
index ec6f89b..3b4fa2e 100644
--- a/drivers/staging/comedi/drivers/addi_apci_3120.c
+++ b/drivers/staging/comedi/drivers/addi_apci_3120.c
@@ -154,6 +154,8 @@ static int apci3120_auto_attach(struct comedi_device *dev,
 	devpriv->amcc = pci_resource_start(pcidev, 0);
 	devpriv->addon = pci_resource_start(pcidev, 2);
 
+	apci3120_reset(dev);
+
 	if (pcidev->irq > 0) {
 		ret = request_irq(pcidev->irq, apci3120_interrupt, IRQF_SHARED,
 				  dev->board_name, dev);
@@ -232,7 +234,6 @@ static int apci3120_auto_attach(struct comedi_device *dev,
 	s->insn_read	= apci3120_read_insn_timer;
 	s->insn_config	= apci3120_config_insn_timer;
 
-	apci3120_reset(dev);
 	return 0;
 }
 
-- 
2.0.3



More information about the devel mailing list