From patchwork Sun Mar 29 11:12:27 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell King - ARM Linux X-Patchwork-Id: 14964 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n2TBCl5t012170 for ; Sun, 29 Mar 2009 11:12:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754422AbZC2LMh (ORCPT ); Sun, 29 Mar 2009 07:12:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754556AbZC2LMh (ORCPT ); Sun, 29 Mar 2009 07:12:37 -0400 Received: from caramon.arm.linux.org.uk ([78.32.30.218]:51628 "EHLO caramon.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753756AbZC2LMf (ORCPT ); Sun, 29 Mar 2009 07:12:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.linux.org.uk; s=caramon; h=Date:From:To:Subject:Message-ID: MIME-Version:Content-Type:Sender; bh=eLn9KvAUZxI0h5jn83FOk4plP+B TcGbjVPGSOG0uC/4=; b=FI60XQEj33UHRgszEehQioV7PtdSbtyLUfP16XuOdyR bdSn6iQf9Kwn0AAM9zLx2f3/wRUuH0vgv3P3RaWFcC4xbKRMtT2lShlADq9B/CKY XqxHqTFjoRe7nqD/l/MT1Qvh4Fe6EUEqEc7cLvgBOQCKXxHio90OJL9vZGUoBrsk = Received: from n2100.arm.linux.org.uk ([2002:4e20:1eda:1:214:fdff:fe10:4f86]) by caramon.arm.linux.org.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1LnswH-0002PL-GW; Sun, 29 Mar 2009 12:12:30 +0100 Received: from linux by n2100.arm.linux.org.uk with local (Exim 4.69) (envelope-from ) id 1LnswF-000808-V2; Sun, 29 Mar 2009 12:12:27 +0100 Date: Sun, 29 Mar 2009 12:12:27 +0100 From: Russell King - ARM Linux To: linux-media@vger.kernel.org, Mauro Carvalho Chehab Subject: [PATCH] Fix buglets in v4l1 compatibility layer Message-ID: <20090329111227.GA29140@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Russell King The following patch fixes a few bugs I've noticed in the V4L1 compatibility layer: - VIDEO_MODE_AUTO for get/set input ioctls was not being handled - wrong V4L2 ioctl being used in v4l1_compat_select_tuner Signed-off-by: Russell King --- drivers/media/video/v4l1-compat.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/video/v4l1-compat.c b/drivers/media/video/v4l1-compat.c index b617bf0..02f2a6d 100644 --- a/drivers/media/video/v4l1-compat.c +++ b/drivers/media/video/v4l1-compat.c @@ -575,6 +575,8 @@ static noinline long v4l1_compat_get_input_info( chan->norm = VIDEO_MODE_NTSC; if (sid & V4L2_STD_SECAM) chan->norm = VIDEO_MODE_SECAM; + if (sid == V4L2_STD_ALL) + chan->norm = VIDEO_MODE_AUTO; } done: return err; @@ -601,6 +603,9 @@ static noinline long v4l1_compat_set_input( case VIDEO_MODE_SECAM: sid = V4L2_STD_SECAM; break; + case VIDEO_MODE_AUTO: + sid = V4L2_STD_ALL; + break; } if (0 != sid) { err = drv(file, VIDIOC_S_STD, &sid); @@ -804,9 +809,9 @@ static noinline long v4l1_compat_select_tuner( t.index = tun->tuner; - err = drv(file, VIDIOC_S_INPUT, &t); + err = drv(file, VIDIOC_S_TUNER, &t); if (err < 0) - dprintk("VIDIOCSTUNER / VIDIOC_S_INPUT: %ld\n", err); + dprintk("VIDIOCSTUNER / VIDIOC_S_TUNER: %ld\n", err); return err; }