diff options
author | Ian Abbott <abbotti@mev.co.uk> | 2020-02-07 15:13:58 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-02-10 10:25:06 -0800 |
commit | e3b7ce73c578b77b592bd3f2da71b90f2c581c87 (patch) | |
tree | 7f385ab37de29e7582acc9af7a1ef4c29adfdf78 /drivers/staging/comedi/drivers/ni_660x.c | |
parent | staging: comedi: ni_routes: Refactor ni_find_valid_routes() (diff) | |
download | linux-dev-e3b7ce73c578b77b592bd3f2da71b90f2c581c87.tar.xz linux-dev-e3b7ce73c578b77b592bd3f2da71b90f2c581c87.zip |
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>
Diffstat (limited to 'drivers/staging/comedi/drivers/ni_660x.c')
-rw-r--r-- | drivers/staging/comedi/drivers/ni_660x.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/comedi/drivers/ni_660x.c b/drivers/staging/comedi/drivers/ni_660x.c index 4ee9b260eab0..75d5c9c24596 100644 --- a/drivers/staging/comedi/drivers/ni_660x.c +++ b/drivers/staging/comedi/drivers/ni_660x.c @@ -1035,7 +1035,7 @@ static int ni_660x_auto_attach(struct comedi_device *dev, ni_660x_init_tio_chips(dev, board->n_chips); /* prepare the device for globally-named routes. */ - if (ni_assign_device_routes("ni_660x", board->name, + if (ni_assign_device_routes("ni_660x", board->name, NULL, &devpriv->routing_tables) < 0) { dev_warn(dev->class_dev, "%s: %s device has no signal routing table.\n", __func__, board->name); |