datapath: Constify ops structures.
[sliver-openvswitch.git] / datapath / vport.c
index c68e181..fdbf522 100644 (file)
@@ -25,7 +25,7 @@
 
 /* List of statically compiled vport implementations.  Don't forget to also
  * add yours to the list at the bottom of vport.h. */
-static struct vport_ops *base_vport_ops_list[] = {
+static const struct vport_ops *base_vport_ops_list[] = {
        &netdev_vport_ops,
        &internal_vport_ops,
        &patch_vport_ops,
@@ -113,7 +113,7 @@ int vport_init(void)
        }
 
        for (i = 0; i < ARRAY_SIZE(base_vport_ops_list); i++) {
-               struct vport_ops *new_ops = base_vport_ops_list[i];
+               const struct vport_ops *new_ops = base_vport_ops_list[i];
 
                if (new_ops->init)
                        err = new_ops->init();