staging: comedi: ni_routes: Allow alternate board name for routes
authorIan Abbott <abbotti@mev.co.uk>
Fri, 7 Feb 2020 15:13:58 +0000 (15:13 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 Feb 2020 18:25:06 +0000 (10:25 -0800)
commite3b7ce73c578b77b592bd3f2da71b90f2c581c87
tree7f385ab37de29e7582acc9af7a1ef4c29adfdf78
parent075a329591540affcc32af0da09abd54549e1659
staging: comedi: ni_routes: Allow alternate board name for routes

We do not have or provide routing information available for all
supported boards.  Some of the boards for which we do not currently
provide routing information actually have identical routes to a similar
board for which we do provide routing information.  To avoid having to
provide duplicate routing information, add an "alternate board name"
parameter (possibly `NULl`) to `ni_assign_device_routes()` and
`ni_find_device_routes()`.  If the routing information cannot be found
for the actual board name, try finding it using the alternate board
name.

Cc: Éric Piel <piel@delmic.com>
Cc: Spencer E. Olson <olsonse@umich.edu>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20200207151400.272678-3-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/ni_660x.c
drivers/staging/comedi/drivers/ni_mio_common.c
drivers/staging/comedi/drivers/ni_routes.c
drivers/staging/comedi/drivers/ni_routes.h