This check is not necessary. The cmd->chanlist_len will always be
less than or equal to the subdevice len_chanlist that was setup
during the attach of the device.
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>
/* Default PWM frequency */
#define PWM_DEFAULT_PERIOD ((long)(1E9/100))
-/* Number of channels */
-#define NUMCHANNELS 8
-
/* Size of one A/D value */
#define SIZEADIN ((sizeof(int16_t)))
unsigned int chan = CR_CHAN(cmd->chanlist[i]);
unsigned int range = CR_RANGE(cmd->chanlist[i]);
- if (i >= NUMCHANNELS)
- break;
-
devpriv->dux_commands[i + 2] = create_adc_command(chan, range);
}