staging: comedi: amplc_dio200_common: return void from dio200_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>
This commit is contained in:
parent
06f55bb778
commit
157a340d1f
1 changed files with 4 additions and 14 deletions
|
@ -209,7 +209,7 @@ static void dio200_stop_intr(struct comedi_device *dev,
|
||||||
dio200_write8(dev, subpriv->ofs, 0);
|
dio200_write8(dev, subpriv->ofs, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int dio200_start_intr(struct comedi_device *dev,
|
static void dio200_start_intr(struct comedi_device *dev,
|
||||||
struct comedi_subdevice *s)
|
struct comedi_subdevice *s)
|
||||||
{
|
{
|
||||||
const struct dio200_board *board = comedi_board(dev);
|
const struct dio200_board *board = comedi_board(dev);
|
||||||
|
@ -229,8 +229,6 @@ static int dio200_start_intr(struct comedi_device *dev,
|
||||||
subpriv->enabled_isns = isn_bits;
|
subpriv->enabled_isns = isn_bits;
|
||||||
if (board->has_int_sce)
|
if (board->has_int_sce)
|
||||||
dio200_write8(dev, subpriv->ofs, isn_bits);
|
dio200_write8(dev, subpriv->ofs, isn_bits);
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int dio200_inttrig_start_intr(struct comedi_device *dev,
|
static int dio200_inttrig_start_intr(struct comedi_device *dev,
|
||||||
|
@ -240,7 +238,6 @@ static int dio200_inttrig_start_intr(struct comedi_device *dev,
|
||||||
struct dio200_subdev_intr *subpriv = s->private;
|
struct dio200_subdev_intr *subpriv = s->private;
|
||||||
struct comedi_cmd *cmd = &s->async->cmd;
|
struct comedi_cmd *cmd = &s->async->cmd;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
int event = 0;
|
|
||||||
|
|
||||||
if (trig_num != cmd->start_arg)
|
if (trig_num != cmd->start_arg)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -248,13 +245,10 @@ static int dio200_inttrig_start_intr(struct comedi_device *dev,
|
||||||
spin_lock_irqsave(&subpriv->spinlock, flags);
|
spin_lock_irqsave(&subpriv->spinlock, flags);
|
||||||
s->async->inttrig = NULL;
|
s->async->inttrig = NULL;
|
||||||
if (subpriv->active)
|
if (subpriv->active)
|
||||||
event = dio200_start_intr(dev, s);
|
dio200_start_intr(dev, s);
|
||||||
|
|
||||||
spin_unlock_irqrestore(&subpriv->spinlock, flags);
|
spin_unlock_irqrestore(&subpriv->spinlock, flags);
|
||||||
|
|
||||||
if (event)
|
|
||||||
comedi_event(dev, s);
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -438,7 +432,6 @@ static int dio200_subdev_intr_cmd(struct comedi_device *dev,
|
||||||
struct comedi_cmd *cmd = &s->async->cmd;
|
struct comedi_cmd *cmd = &s->async->cmd;
|
||||||
struct dio200_subdev_intr *subpriv = s->private;
|
struct dio200_subdev_intr *subpriv = s->private;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
int event = 0;
|
|
||||||
|
|
||||||
spin_lock_irqsave(&subpriv->spinlock, flags);
|
spin_lock_irqsave(&subpriv->spinlock, flags);
|
||||||
|
|
||||||
|
@ -448,13 +441,10 @@ static int dio200_subdev_intr_cmd(struct comedi_device *dev,
|
||||||
if (cmd->start_src == TRIG_INT)
|
if (cmd->start_src == TRIG_INT)
|
||||||
s->async->inttrig = dio200_inttrig_start_intr;
|
s->async->inttrig = dio200_inttrig_start_intr;
|
||||||
else /* TRIG_NOW */
|
else /* TRIG_NOW */
|
||||||
event = dio200_start_intr(dev, s);
|
dio200_start_intr(dev, s);
|
||||||
|
|
||||||
spin_unlock_irqrestore(&subpriv->spinlock, flags);
|
spin_unlock_irqrestore(&subpriv->spinlock, flags);
|
||||||
|
|
||||||
if (event)
|
|
||||||
comedi_event(dev, s);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue