From patchwork Sun Jun 26 16:06:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 919232 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5QGKHRx002688 for ; Sun, 26 Jun 2011 16:20:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754380Ab1FZQJY (ORCPT ); Sun, 26 Jun 2011 12:09:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48072 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754280Ab1FZQHn (ORCPT ); Sun, 26 Jun 2011 12:07:43 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5QG7h04022902 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 26 Jun 2011 12:07:43 -0400 Received: from pedra (vpn-8-3.rdu.redhat.com [10.11.8.3]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p5QG7SvT001219; Sun, 26 Jun 2011 12:07:42 -0400 Date: Sun, 26 Jun 2011 13:06:18 -0300 From: Mauro Carvalho Chehab Cc: Linux Media Mailing List , LKML Subject: [PATCH 14/14] [media] DocBook/v4l: Document the new system-wide version behavior Message-ID: <20110626130618.5933926c@pedra> In-Reply-To: References: Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 To: unlisted-recipients:; (no To-header on input) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Sun, 26 Jun 2011 16:20:19 +0000 (UTC) Signed-off-by: Mauro Carvalho Chehab diff --git a/Documentation/DocBook/media/v4l/common.xml b/Documentation/DocBook/media/v4l/common.xml index 9028721..a86f7a0 100644 --- a/Documentation/DocBook/media/v4l/common.xml +++ b/Documentation/DocBook/media/v4l/common.xml @@ -236,7 +236,15 @@ important parts of the API. The &VIDIOC-QUERYCAP; ioctl is available to check if the kernel device is compatible with this specification, and to query the functions and I/O -methods supported by the device. Other features can be queried +methods supported by the device. + + Starting with kernel version 3.1, VIDIOC-QUERYCAP will return the +V4L2 API version used by the driver, with generally matches the Kernel version. +There's no need of using &VIDIOC-QUERYCAP; to check if an specific ioctl is +supported, the V4L2 core now returns ENOIOCTLCMD if a driver doesn't provide +support for an ioctl. + + Other features can be queried by calling the respective ioctl, for example &VIDIOC-ENUMINPUT; to learn about the number, types and names of video connectors on the device. Although abstraction is a major objective of this API, the diff --git a/Documentation/DocBook/media/v4l/vidioc-querycap.xml b/Documentation/DocBook/media/v4l/vidioc-querycap.xml index f29f1b8..7aa6973 100644 --- a/Documentation/DocBook/media/v4l/vidioc-querycap.xml +++ b/Documentation/DocBook/media/v4l/vidioc-querycap.xml @@ -67,9 +67,8 @@ driver is not compatible with this specification the ioctl returns an Name of the driver, a unique NUL-terminated ASCII string. For example: "bttv". Driver specific applications can use this information to verify the driver identity. It is also useful -to work around known bugs, or to identify drivers in error reports. -The driver version is stored in the version -field.Storing strings in fixed sized arrays is bad +to work around known bugs, or to identify drivers in error reports. +Storing strings in fixed sized arrays is bad practice but unavoidable here. Drivers and applications should take precautions to never read or write beyond the end of the array and to make sure the strings are properly NUL-terminated. @@ -100,9 +99,13 @@ empty string (bus_info[0] = 0).