bus/vdev: get name from embedded generic device
authorJan Blunck <jblunck@infradead.org>
Tue, 11 Jul 2017 23:15:46 +0000 (19:15 -0400)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 12 Jul 2017 12:15:44 +0000 (14:15 +0200)
Instead of getting the name from the devargs lets take it from the
rte_device.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
lib/librte_eal/common/include/rte_vdev.h

index 3c07b76..fc24298 100644 (file)
@@ -49,8 +49,8 @@ struct rte_vdev_device {
 static inline const char *
 rte_vdev_device_name(const struct rte_vdev_device *dev)
 {
-       if (dev && dev->device.devargs)
-               return dev->device.devargs->name;
+       if (dev && dev->device.name)
+               return dev->device.name;
        return NULL;
 }