]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
staging: comedi: dyna_pci10xx: Don't bother configuring len_chanlist
authorIan Abbott <abbotti@mev.co.uk>
Tue, 16 Apr 2019 13:37:47 +0000 (14:37 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Apr 2019 10:40:51 +0000 (12:40 +0200)
commit4138b1d44f34703508a3d293011216557b6b5e68
treed638d3b6a118b218638af2b0228b62e75dcd9404
parent1598475c66514ce55b570b623d790172d02046f7
staging: comedi: dyna_pci10xx: Don't bother configuring len_chanlist

In the Comedi "attach" and "auto_attach" handlers that set up the Comedi
subdevices, there is no need to initialize the `len_chanlist` member of
Comedi subdevices that do not support Comedi asynchronous streaming
commands.  They can be left set to the initial zeroed out value and
the Comedi core will change the `len_chanlist` member to 1 afterwards in
that case.  The "dyna_pci10xx" driver currently sets the `len_chanlist`
members to the same value as the `n_chan` ("number of channels") member,
but this is unnecessary as none of them support asynchronous streaming.
Remove the initialization of `len_chanlist` from all the subdevices.
This will affect the information reported by the COMEDI_SUBDINFO ioctl
slightly.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/dyna_pci10xx.c