@@ -911,33 +911,6 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg,
case VIDIOC_SUBDEV_QUERYSTD:
return v4l2_subdev_call(sd, video, querystd, arg);
- case VIDIOC_SUBDEV_G_ROUTING: {
- struct v4l2_subdev_routing *routing = arg;
- struct v4l2_subdev_krouting *krouting;
-
- if (!v4l2_subdev_enable_streams_api)
- return -ENOIOCTLCMD;
-
- if (!(sd->flags & V4L2_SUBDEV_FL_STREAMS))
- return -ENOIOCTLCMD;
-
- memset(routing->reserved, 0, sizeof(routing->reserved));
-
- krouting = &state->routing;
-
- if (routing->num_routes < krouting->num_routes) {
- routing->num_routes = krouting->num_routes;
- return -ENOSPC;
- }
-
- memcpy((struct v4l2_subdev_route *)(uintptr_t)routing->routes,
- krouting->routes,
- krouting->num_routes * sizeof(*krouting->routes));
- routing->num_routes = krouting->num_routes;
-
- return 0;
- }
-
case VIDIOC_SUBDEV_S_ROUTING: {
struct v4l2_subdev_routing *routing = arg;
struct v4l2_subdev_route *routes =
@@ -986,6 +959,33 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg,
routing->which, &krouting);
}
+ case VIDIOC_SUBDEV_G_ROUTING: {
+ struct v4l2_subdev_routing *routing = arg;
+ struct v4l2_subdev_krouting *krouting;
+
+ if (!v4l2_subdev_enable_streams_api)
+ return -ENOIOCTLCMD;
+
+ if (!(sd->flags & V4L2_SUBDEV_FL_STREAMS))
+ return -ENOIOCTLCMD;
+
+ memset(routing->reserved, 0, sizeof(routing->reserved));
+
+ krouting = &state->routing;
+
+ if (routing->num_routes < krouting->num_routes) {
+ routing->num_routes = krouting->num_routes;
+ return -ENOSPC;
+ }
+
+ memcpy((struct v4l2_subdev_route *)(uintptr_t)routing->routes,
+ krouting->routes,
+ krouting->num_routes * sizeof(*krouting->routes));
+ routing->num_routes = krouting->num_routes;
+
+ return 0;
+ }
+
case VIDIOC_SUBDEV_G_CLIENT_CAP: {
struct v4l2_subdev_client_capability *client_cap = arg;