From patchwork Fri Jan 4 20:59:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Devin Heitmueller X-Patchwork-Id: 16122 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1TrENN-0007kb-HN; Fri, 04 Jan 2013 22:00:25 +0100 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.75/mailfrontend-3) with esmtp id 1TrENN-00057m-Cz; Fri, 04 Jan 2013 22:00:25 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755168Ab3ADVAT (ORCPT + 1 other); Fri, 4 Jan 2013 16:00:19 -0500 Received: from mail-vc0-f175.google.com ([209.85.220.175]:58276 "EHLO mail-vc0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755074Ab3ADVAG (ORCPT ); Fri, 4 Jan 2013 16:00:06 -0500 Received: by mail-vc0-f175.google.com with SMTP id fy7so16720771vcb.6 for ; Fri, 04 Jan 2013 13:00:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=JsBFPo57QOO6B564oFiBfdY0KTlo6XncbQuRXuQGeso=; b=VAWDsXsvdQv9bNt4gfn0YQeEFmwhh7L2UpZ4ptJZhkL+6L7zo97T78tc3IVL5Okb6s 02kKAEMb2wrqIuOUkFhh6EBlesoya13iGem77LMzNVRxlQ/SyQmWJugGRK5wLe6ChzaR GQvdbbZDFuzQGYFvUGyb0s2oNtAqpuwT+T7S+Mdcqc+8Axtk/z6c1CYq3TMnoP9nkUtR u+rUOQWqbvBHO3kiSGqqj7Vibb9BvtGb3bn7ExUtbA6IbL0i1fvo5Bg+JuCX9klf4q+3 MZYoj9M3sxaOAYOAJWCBidMsRskl4Iy8UbFuZoKdQ7lMh6bR1mLXk7t+Gk29K7TUhJWk Ng1Q== X-Received: by 10.220.142.74 with SMTP id p10mr4908224vcu.63.1357333205880; Fri, 04 Jan 2013 13:00:05 -0800 (PST) Received: from devin-ubuntu2.home (pool-108-54-72-165.nycmny.fios.verizon.net. [108.54.72.165]) by mx.google.com with ESMTPS id z20sm47278440vds.12.2013.01.04.13.00.04 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Jan 2013 13:00:05 -0800 (PST) From: Devin Heitmueller To: linux-media@vger.kernel.org Cc: Devin Heitmueller , Hans Verkuil Subject: [PATCH 14/15] em28xx: zero vbi_format reserved array and add try_vbi_fmt. Date: Fri, 4 Jan 2013 15:59:44 -0500 Message-Id: <1357333186-8466-15-git-send-email-dheitmueller@kernellabs.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1357333186-8466-1-git-send-email-dheitmueller@kernellabs.com> References: <1357333186-8466-1-git-send-email-dheitmueller@kernellabs.com> X-Gm-Message-State: ALoCoQlJB0mUTzSw+iOe+rUX0++Yd+sV+wI9AzXutyLx24uyl9nleNeAbedoED8NhEEno2vUwiWr Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2013.1.4.204815 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1800_1899 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, DATE_TZ_NA 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_MEDIA_BODY 0, __CP_URI_IN_BODY 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MULTIPLE_RCPTS_CC_X2 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS , __YOUTUBE_RCVD 0' Signed-off-by: Hans Verkuil Signed-off-by: Devin Heitmueller --- drivers/media/usb/em28xx/em28xx-video.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c index 1514b27..3adaa7b 100644 --- a/drivers/media/usb/em28xx/em28xx-video.c +++ b/drivers/media/usb/em28xx/em28xx-video.c @@ -1521,6 +1521,7 @@ static int vidioc_g_fmt_vbi_cap(struct file *file, void *priv, format->fmt.vbi.sampling_rate = 6750000 * 4 / 2; format->fmt.vbi.count[0] = dev->vbi_height; format->fmt.vbi.count[1] = dev->vbi_height; + memset(format->fmt.vbi.reserved, 0, sizeof(format->fmt.vbi.reserved)); /* Varies by video standard (NTSC, PAL, etc.) */ if (dev->norm & V4L2_STD_525_60) { @@ -1549,6 +1550,7 @@ static int vidioc_s_fmt_vbi_cap(struct file *file, void *priv, format->fmt.vbi.sampling_rate = 6750000 * 4 / 2; format->fmt.vbi.count[0] = dev->vbi_height; format->fmt.vbi.count[1] = dev->vbi_height; + memset(format->fmt.vbi.reserved, 0, sizeof(format->fmt.vbi.reserved)); /* Varies by video standard (NTSC, PAL, etc.) */ if (dev->norm & V4L2_STD_525_60) { @@ -1991,6 +1993,7 @@ static const struct v4l2_ioctl_ops video_ioctl_ops = { .vidioc_try_fmt_vid_cap = vidioc_try_fmt_vid_cap, .vidioc_s_fmt_vid_cap = vidioc_s_fmt_vid_cap, .vidioc_g_fmt_vbi_cap = vidioc_g_fmt_vbi_cap, + .vidioc_try_fmt_vbi_cap = vidioc_g_fmt_vbi_cap, .vidioc_s_fmt_vbi_cap = vidioc_s_fmt_vbi_cap, .vidioc_enum_framesizes = vidioc_enum_framesizes, .vidioc_g_audio = vidioc_g_audio,