summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2014-09-09 16:15:55 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-09-11 14:35:21 -0700
commit22499048e328469d228bbcbeb32e6c7de3322025 (patch)
treed8e18da06ce2698831803c68933bd3417cc4ef2c /drivers/staging/comedi
parent811ba919e469b2c96562119dfee3f93a490f4990 (diff)
staging: comedi: pcmmio: return void from pcmmio_start_intr()
This function always returns '0' so the comedi_event() is never done by the callers. Change the return type to void and remove the comedi_event() dead code. 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/pcmmio.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/staging/comedi/drivers/pcmmio.c b/drivers/staging/comedi/drivers/pcmmio.c
index 244cadf0b13d..fc40ee2b34e9 100644
--- a/drivers/staging/comedi/drivers/pcmmio.c
+++ b/drivers/staging/comedi/drivers/pcmmio.c
@@ -406,8 +406,8 @@ static irqreturn_t interrupt_pcmmio(int irq, void *d)
}
/* devpriv->spinlock is already locked */
-static int pcmmio_start_intr(struct comedi_device *dev,
- struct comedi_subdevice *s)
+static void pcmmio_start_intr(struct comedi_device *dev,
+ struct comedi_subdevice *s)
{
struct pcmmio_private *devpriv = dev->private;
struct comedi_cmd *cmd = &s->async->cmd;
@@ -434,8 +434,6 @@ static int pcmmio_start_intr(struct comedi_device *dev,
/* set polarity and enable interrupts */
pcmmio_dio_write(dev, pol_bits, PCMMIO_PAGE_POL, 0);
pcmmio_dio_write(dev, bits, PCMMIO_PAGE_ENAB, 0);
-
- return 0;
}
static int pcmmio_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
@@ -458,7 +456,6 @@ static int pcmmio_inttrig_start_intr(struct comedi_device *dev,
struct pcmmio_private *devpriv = dev->private;
struct comedi_cmd *cmd = &s->async->cmd;
unsigned long flags;
- int event = 0;
if (trig_num != cmd->start_arg)
return -EINVAL;
@@ -466,12 +463,9 @@ static int pcmmio_inttrig_start_intr(struct comedi_device *dev,
spin_lock_irqsave(&devpriv->spinlock, flags);
s->async->inttrig = NULL;
if (devpriv->active)
- event = pcmmio_start_intr(dev, s);
+ pcmmio_start_intr(dev, s);
spin_unlock_irqrestore(&devpriv->spinlock, flags);
- if (event)
- comedi_event(dev, s);
-
return 1;
}
@@ -483,7 +477,6 @@ static int pcmmio_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
struct pcmmio_private *devpriv = dev->private;
struct comedi_cmd *cmd = &s->async->cmd;
unsigned long flags;
- int event = 0;
spin_lock_irqsave(&devpriv->spinlock, flags);
devpriv->active = 1;
@@ -494,13 +487,10 @@ static int pcmmio_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
if (cmd->start_src == TRIG_INT)
s->async->inttrig = pcmmio_inttrig_start_intr;
else /* TRIG_NOW */
- event = pcmmio_start_intr(dev, s);
+ pcmmio_start_intr(dev, s);
spin_unlock_irqrestore(&devpriv->spinlock, flags);
- if (event)
- comedi_event(dev, s);
-
return 0;
}