staging: comedi: ni_660x: remove enum ni_660x_subdevices
Hard-coding the subdevice order is normally a bad idea. If a new subdevice is added, or removed, it could potentially break pretty badly. Remove the enum and associated NI_660X_GPCT_SUBDEV() helper that hard-code the subdevice order. Fix the (*auto_attach) so it initializes all the subdevices without depending on the hard-coded order. Change the interrupt handler so that all the counter subdevices are handled without depending on the hard-coded order. 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>
Showing
Please register or sign in to comment