From: H Hartley Sweeten Date: Wed, 12 Jun 2013 23:23:14 +0000 (-0700) Subject: staging: comedi: addi_apci_3xxx: only allocate needed subdevices X-Git-Tag: omap-for-v3.11/fixes-for-merge-window~76^2~107 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=656e39fedcf01b688a2aa1dca78c6c2a571264f1;p=pandora-kernel.git 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: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed