From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from perceval.ideasonboard.com ([95.142.166.194]:59831 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753445Ab1A0MbX (ORCPT ); Thu, 27 Jan 2011 07:31:23 -0500 From: Laurent Pinchart To: linux-media@vger.kernel.org Cc: sakari.ailus@maxwell.research.nokia.com Subject: [PATCH v1 1/8] v4l: subdev: Generic ioctl support Date: Thu, 27 Jan 2011 13:31:05 +0100 Message-Id: <1296131472-30045-2-git-send-email-laurent.pinchart@ideasonboard.com> In-Reply-To: <1296131472-30045-1-git-send-email-laurent.pinchart@ideasonboard.com> References: <1296131472-30045-1-git-send-email-laurent.pinchart@ideasonboard.com> List-ID: Sender: 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 --- Documentation/video4linux/v4l2-framework.txt | 5 +++++ drivers/media/video/v4l2-subdev.c | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt index d0fb880..1bb5f22 100644 --- a/Documentation/video4linux/v4l2-framework.txt +++ b/Documentation/video4linux/v4l2-framework.txt @@ -407,6 +407,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 ---------------------- diff --git a/drivers/media/video/v4l2-subdev.c b/drivers/media/video/v4l2-subdev.c index e706c4c..1710a64 100644 --- a/drivers/media/video/v4l2-subdev.c +++ b/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; -- 1.7.3.4