From patchwork Fri Jan 7 02:49:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qing Xu X-Patchwork-Id: 462331 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0735StG002892 for ; Fri, 7 Jan 2011 03:05:29 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756018Ab1AGDFU (ORCPT ); Thu, 6 Jan 2011 22:05:20 -0500 Received: from dakia2.marvell.com ([65.219.4.35]:35668 "EHLO dakia2.marvell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755746Ab1AGDFT (ORCPT ); Thu, 6 Jan 2011 22:05:19 -0500 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 07 Jan 2011 03:05:29 +0000 (UTC) X-Greylist: delayed 707 seconds by postgrey-1.27 at vger.kernel.org; Thu, 06 Jan 2011 22:05:19 EST X-ASG-Debug-ID: 1294368811-082d778a0001-rVgMWv Received: from maili.marvell.com (maili.marvell.com [10.68.76.51]) by dakia2.marvell.com with ESMTP id WKmdjpJonrtfzI84; Thu, 06 Jan 2011 18:53:31 -0800 (PST) X-Barracuda-Envelope-From: qingx@marvell.com Received: from localhost (unknown [10.38.36.165]) by maili.marvell.com (Postfix) with ESMTP id 52FFC8A4A1; Thu, 6 Jan 2011 18:53:31 -0800 (PST) From: Qing Xu To: g.liakhovetski@gmx.de Cc: linux-media@vger.kernel.org, Qing Xu , Kassey Lee X-ASG-Orig-Subj: [PATCH] [media] v4l: soc-camera: add enum-frame-size ioctl Subject: [PATCH] [media] v4l: soc-camera: add enum-frame-size ioctl Date: Fri, 7 Jan 2011 10:49:55 +0800 X-ASG-Orig-Subj: [PATCH] [media] v4l: soc-camera: add enum-frame-size ioctl Message-Id: <1294368595-2518-1-git-send-email-qingx@marvell.com> X-Mailer: git-send-email 1.6.3.3 X-Barracuda-Connect: maili.marvell.com[10.68.76.51] X-Barracuda-Start-Time: 1294368811 X-Barracuda-URL: http://10.68.76.222:80/cgi-mod/mark.cgi X-Barracuda-Spam-Score: -1002.00 X-Barracuda-Spam-Status: No, SCORE=-1002.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=1000.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org diff --git a/drivers/media/video/soc_camera.c b/drivers/media/video/soc_camera.c index 052bd6d..11715fb 100644 --- a/drivers/media/video/soc_camera.c +++ b/drivers/media/video/soc_camera.c @@ -145,6 +145,16 @@ static int soc_camera_s_std(struct file *file, void *priv, v4l2_std_id *a) return v4l2_subdev_call(sd, core, s_std, *a); } +static int soc_camera_enum_framesizes(struct file *file, void *fh, + struct v4l2_frmsizeenum *fsize) +{ + struct soc_camera_device *icd = file->private_data; + struct v4l2_subdev *sd = soc_camera_to_subdev(icd); + + return v4l2_subdev_call(sd, video, enum_framesizes, fsize); +} + + static int soc_camera_reqbufs(struct file *file, void *priv, struct v4l2_requestbuffers *p) { @@ -1302,6 +1312,7 @@ static const struct v4l2_ioctl_ops soc_camera_ioctl_ops = { .vidioc_g_input = soc_camera_g_input, .vidioc_s_input = soc_camera_s_input, .vidioc_s_std = soc_camera_s_std, + .vidioc_enum_framesizes = soc_camera_enum_framesizes, .vidioc_reqbufs = soc_camera_reqbufs, .vidioc_try_fmt_vid_cap = soc_camera_try_fmt_vid_cap, .vidioc_querybuf = soc_camera_querybuf,