Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 656e39fe authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

staging: comedi: addi_apci_3xxx: only allocate needed subdevices



The number of subdevices needed by a given board supported by this
driver can cary from 2 (for the apci3500) to a maximum of 5. Currently
this driver always allocates 7 subdevices and sets the subdevice type
to COMEDI_SUBD_UNUSED for the ones that are not needed.

Calculate the actual number of needed subdevices from the boardinfo
and only allocate and setup the ones that are used.

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f32376e9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment