summaryrefslogtreecommitdiff
path: root/drivers/bus/ifpga
diff options
context:
space:
mode:
authorThomas Monjalon <thomas@monjalon.net>2018-09-19 23:55:01 +0200
committerThomas Monjalon <thomas@monjalon.net>2018-10-11 14:09:24 +0200
commit2effa126fbd8d53e0a5d723ac8314c1bb2c3ce9b (patch)
tree859585920f53c2a3354f3790383836c52370b56c /drivers/bus/ifpga
parente7ec4d2fc8337d31ed67429170de1c7cc678d7ed (diff)
downloaddpdk-2effa126fbd8d53e0a5d723ac8314c1bb2c3ce9b.zip
dpdk-2effa126fbd8d53e0a5d723ac8314c1bb2c3ce9b.tar.gz
dpdk-2effa126fbd8d53e0a5d723ac8314c1bb2c3ce9b.tar.xz
devargs: simplify parameters of removal function
The function rte_devargs_remove(), which is intended to be internal, can take a devargs structure as argument. The matching is still using string comparison of bus name and device name. It is simpler and may allow a different devargs matching in future. Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com> Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com> Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Diffstat (limited to 'drivers/bus/ifpga')
-rw-r--r--drivers/bus/ifpga/ifpga_bus.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/bus/ifpga/ifpga_bus.c b/drivers/bus/ifpga/ifpga_bus.c
index c54b59d..3ef035b 100644
--- a/drivers/bus/ifpga/ifpga_bus.c
+++ b/drivers/bus/ifpga/ifpga_bus.c
@@ -361,7 +361,6 @@ static int
ifpga_unplug(struct rte_device *dev)
{
struct rte_afu_device *afu_dev = NULL;
- struct rte_devargs *devargs = NULL;
int ret;
if (dev == NULL)
@@ -371,15 +370,13 @@ ifpga_unplug(struct rte_device *dev)
if (!afu_dev)
return -ENOENT;
- devargs = dev->devargs;
-
ret = ifpga_remove_driver(afu_dev);
if (ret)
return ret;
TAILQ_REMOVE(&ifpga_afu_dev_list, afu_dev, next);
- rte_devargs_remove(devargs->bus->name, devargs->name);
+ rte_devargs_remove(dev->devargs);
free(afu_dev);
return 0;