瀏覽代碼

[media] v4l: subdev: Generic ioctl support

Instead of returning an error when receiving an ioctl call with an
unsupported command, forward the call to the subdev core::ioctl handler.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Laurent Pinchart 15 年之前
父節點
當前提交
c30b46e58b
共有 2 個文件被更改,包括 6 次插入1 次删除
  1. 5 0
      Documentation/video4linux/v4l2-framework.txt
  2. 1 1
      drivers/media/video/v4l2-subdev.c

+ 5 - 0
Documentation/video4linux/v4l2-framework.txt

@@ -405,6 +405,11 @@ VIDIOC_UNSUBSCRIBE_EVENT
 	To properly support events, the poll() file operation is also
 	implemented.
 
+Private ioctls
+
+	All ioctls not in the above list are passed directly to the sub-device
+	driver through the core::ioctl operation.
+
 
 I2C sub-device drivers
 ----------------------

+ 1 - 1
drivers/media/video/v4l2-subdev.c

@@ -276,7 +276,7 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg)
 	}
 #endif
 	default:
-		return -ENOIOCTLCMD;
+		return v4l2_subdev_call(sd, core, ioctl, cmd, arg);
 	}
 
 	return 0;