switchdev: push object ID back to object structure

Suggested-by: Scott Feldman <sfeldma@gmail.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Scott Feldman <sfeldma@gmail.com>
Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c
index 0b87cf6..1a79e19 100644
--- a/net/bridge/br_vlan.c
+++ b/net/bridge/br_vlan.c
@@ -83,13 +83,13 @@
 		err = vlan_vid_add(dev, br->vlan_proto, vid);
 	} else {
 		struct switchdev_obj_port_vlan v = {
+			.obj.id = SWITCHDEV_OBJ_ID_PORT_VLAN,
 			.flags = flags,
 			.vid_begin = vid,
 			.vid_end = vid,
 		};
 
-		err = switchdev_port_obj_add(dev, SWITCHDEV_OBJ_ID_PORT_VLAN,
-					     &v.obj);
+		err = switchdev_port_obj_add(dev, &v.obj);
 		if (err == -EOPNOTSUPP)
 			err = 0;
 	}
@@ -133,12 +133,12 @@
 		vlan_vid_del(dev, br->vlan_proto, vid);
 	} else {
 		struct switchdev_obj_port_vlan v = {
+			.obj.id = SWITCHDEV_OBJ_ID_PORT_VLAN,
 			.vid_begin = vid,
 			.vid_end = vid,
 		};
 
-		err = switchdev_port_obj_del(dev, SWITCHDEV_OBJ_ID_PORT_VLAN,
-					     &v.obj);
+		err = switchdev_port_obj_del(dev, &v.obj);
 		if (err == -EOPNOTSUPP)
 			err = 0;
 	}