eal: make driver pointer const in device struct
authorStephen Hemminger <stephen@networkplumber.org>
Fri, 23 Dec 2016 15:57:54 +0000 (16:57 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Sat, 24 Dec 2016 17:46:40 +0000 (18:46 +0100)
The info in rte_device about driver is immutable and
shouldn't change.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
lib/librte_eal/common/include/rte_dev.h

index 1708244..b17791f 100644 (file)
@@ -122,7 +122,7 @@ struct rte_driver;
  */
 struct rte_device {
        TAILQ_ENTRY(rte_device) next; /**< Next device */
-       struct rte_driver *driver;    /**< Associated driver */
+       const struct rte_driver *driver;/**< Associated driver */
        int numa_node;                /**< NUMA node connection */
        struct rte_devargs *devargs;  /**< Device user arguments */
 };