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: 1934761 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id E47C1DFABD for ; Fri, 4 Jan 2013 21:00:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755168Ab3ADVAT (ORCPT ); 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 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,