mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 15:47:36 +00:00
staging: comedi: amplc_dio200_common: remove unnecessary 'counter_number' checks
The 'counter_number' in these functions is the comedi channel number from the chanspec. The comedi core validates the chanspec before calling the driver functions. Remove the unnecessary checks. 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
fdb7c3ece2
commit
ed023d529c
1 changed files with 0 additions and 8 deletions
|
@ -577,8 +577,6 @@ static int dio200_subdev_8254_set_gate_src(struct comedi_device *dev,
|
|||
|
||||
if (!board->has_clk_gat_sce)
|
||||
return -1;
|
||||
if (counter_number > 2)
|
||||
return -1;
|
||||
if (gate_src > (board->is_pcie ? 31 : 7))
|
||||
return -1;
|
||||
|
||||
|
@ -598,8 +596,6 @@ static int dio200_subdev_8254_get_gate_src(struct comedi_device *dev,
|
|||
|
||||
if (!board->has_clk_gat_sce)
|
||||
return -1;
|
||||
if (counter_number > 2)
|
||||
return -1;
|
||||
|
||||
return subpriv->gate_src[counter_number];
|
||||
}
|
||||
|
@ -615,8 +611,6 @@ static int dio200_subdev_8254_set_clock_src(struct comedi_device *dev,
|
|||
|
||||
if (!board->has_clk_gat_sce)
|
||||
return -1;
|
||||
if (counter_number > 2)
|
||||
return -1;
|
||||
if (clock_src > (board->is_pcie ? 31 : 7))
|
||||
return -1;
|
||||
|
||||
|
@ -638,8 +632,6 @@ static int dio200_subdev_8254_get_clock_src(struct comedi_device *dev,
|
|||
|
||||
if (!board->has_clk_gat_sce)
|
||||
return -1;
|
||||
if (counter_number > 2)
|
||||
return -1;
|
||||
|
||||
clock_src = subpriv->clock_src[counter_number];
|
||||
*period_ns = clock_period[clock_src];
|
||||
|
|
Loading…
Reference in a new issue