staging: comedi: comedi_test: ao subdevice does not support async commands

The comedi_subdevices array is kzalloc()'d so the async command callbacks do
not need to be set to NULL when the analog output subdevice is initialized.

Also, remove the initialzation of the subdevice 'len_chanlist' since this
value is only used by the async commands. The core will default it to 1.

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:
H Hartley Sweeten 2014-04-17 10:07:50 -07:00 committed by Greg Kroah-Hartman
parent c50a39824d
commit 6e1d1f336e

View File

@ -413,11 +413,7 @@ static int waveform_attach(struct comedi_device *dev,
s->n_chan = N_CHANS; s->n_chan = N_CHANS;
s->maxdata = 0xffff; s->maxdata = 0xffff;
s->range_table = &waveform_ai_ranges; s->range_table = &waveform_ai_ranges;
s->len_chanlist = s->n_chan * 2;
s->insn_write = waveform_ao_insn_write; s->insn_write = waveform_ao_insn_write;
s->do_cmd = NULL;
s->do_cmdtest = NULL;
s->cancel = NULL;
/* Our default loopback value is just a 0V flatline */ /* Our default loopback value is just a 0V flatline */
for (i = 0; i < s->n_chan; i++) for (i = 0; i < s->n_chan; i++)