summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi/drivers/ni_labpc.c
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2013-04-22 12:33:53 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-23 10:36:28 -0700
commit3e034797191de9981cddff4d1a8203d020360958 (patch)
treeca7f375862f77ac452bbbc367ddbaa5aea031f85 /drivers/staging/comedi/drivers/ni_labpc.c
parent767308842b4b970ca105b1e80cd92af39355dfc5 (diff)
staging: comedi: ni_labpc: pass the isr_flags to labpc_common_attach()
The PCI and PCMCIA LabPC boards use shared interrupts and need the IRQF_SHARED flag set when requesting the irq, the ISA boards do not. Instead of checking the 'bustype' in labpc_common_attach() in order to determine the isr_flags, just pass the flags as a parameter to the function. 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/drivers/ni_labpc.c')
-rw-r--r--drivers/staging/comedi/drivers/ni_labpc.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c
index 56fb5b2136a4..365149a2ef73 100644
--- a/drivers/staging/comedi/drivers/ni_labpc.c
+++ b/drivers/staging/comedi/drivers/ni_labpc.c
@@ -1588,12 +1588,11 @@ static int labpc_eeprom_insn_read(struct comedi_device *dev,
}
int labpc_common_attach(struct comedi_device *dev,
- unsigned int irq)
+ unsigned int irq, unsigned long isr_flags)
{
const struct labpc_boardinfo *board = comedi_board(dev);
struct labpc_private *devpriv = dev->private;
struct comedi_subdevice *s;
- unsigned long isr_flags;
int ret;
int i;
@@ -1616,10 +1615,6 @@ int labpc_common_attach(struct comedi_device *dev,
}
if (irq) {
- isr_flags = 0;
- if (board->bustype == pci_bustype ||
- board->bustype == pcmcia_bustype)
- isr_flags |= IRQF_SHARED;
ret = request_irq(irq, labpc_interrupt, isr_flags,
dev->board_name, dev);
if (ret == 0)
@@ -1738,7 +1733,7 @@ static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it)
if (ret)
return ret;
- ret = labpc_common_attach(dev, irq);
+ ret = labpc_common_attach(dev, irq, 0);
if (ret)
return ret;