Add trivial S_ROUTING IOCTL support for drivers where routing is static. Essentially this means returning the same information G_ROUTING call would have done. Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> --- drivers/media/v4l2-core/v4l2-subdev.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c index 7871ec8a66d1..2b3bfc4bc1e1 100644 --- a/drivers/media/v4l2-core/v4l2-subdev.c +++ b/drivers/media/v4l2-core/v4l2-subdev.c @@ -894,6 +894,9 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg, struct v4l2_subdev_krouting krouting = {}; unsigned int i; + if (!v4l2_subdev_has_op(sd, pad, set_routing)) + goto do_vidioc_subdev_g_routing; + if (!v4l2_subdev_enable_streams_api) return -ENOIOCTLCMD; @@ -941,6 +944,7 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg, return rval; } fallthrough; +do_vidioc_subdev_g_routing: case VIDIOC_SUBDEV_G_ROUTING: { struct v4l2_subdev_routing *routing = arg; -- 2.39.2