From patchwork Wed Jul 6 18:04:01 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: 950512 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 p66I5s6m009203 for ; Wed, 6 Jul 2011 18:05:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755324Ab1GFSEi (ORCPT ); Wed, 6 Jul 2011 14:04:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5273 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755264Ab1GFSEg (ORCPT ); Wed, 6 Jul 2011 14:04:36 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p66I4a5t013638 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 6 Jul 2011 14:04:36 -0400 Received: from pedra (vpn1-4-139.ams2.redhat.com [10.36.4.139]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p66I4D6U027326; Wed, 6 Jul 2011 14:04:34 -0400 Date: Wed, 6 Jul 2011 15:04:01 -0300 From: Mauro Carvalho Chehab Cc: Linux Media Mailing List , Linux Kernel Mailing List Subject: [PATCH RFCv3 14/17] [media] DocBook/dvb: Use generic descriptions for the frontend API Message-ID: <20110706150401.0223251a@pedra> In-Reply-To: References: Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 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]); Wed, 06 Jul 2011 18:05:55 +0000 (UTC) Move generic stuff into gen-errors.xml, and remove them from DVB API. While here, removes two bogus error codes that aren't supported or used on Linux: EINTERNAL and ENOSIGNAL. Signed-off-by: Mauro Carvalho Chehab diff --git a/Documentation/DocBook/media/dvb/dvbproperty.xml b/Documentation/DocBook/media/dvb/dvbproperty.xml index 33274bc..207e1a5 100644 --- a/Documentation/DocBook/media/dvb/dvbproperty.xml +++ b/Documentation/DocBook/media/dvb/dvbproperty.xml @@ -82,15 +82,6 @@ struct dtv_properties { &return-value-dvb; - EINVAL - Invalid parameter(s) received or number of parameters out of the range. - - ENOMEM - Out of memory. - - EFAULT - Failure while copying data from/to userspace. - EOPNOTSUPP Property type not supported. @@ -139,15 +130,6 @@ struct dtv_properties { &return-value-dvb; - EINVAL - Invalid parameter(s) received or number of parameters out of the range. - - ENOMEM - Out of memory. - - EFAULT - Failure while copying data from/to userspace. - EOPNOTSUPP Property type not supported. diff --git a/Documentation/DocBook/media/dvb/frontend.xml b/Documentation/DocBook/media/dvb/frontend.xml index c5a5cb4..61407ea 100644 --- a/Documentation/DocBook/media/dvb/frontend.xml +++ b/Documentation/DocBook/media/dvb/frontend.xml @@ -575,7 +575,7 @@ typedef enum fe_hierarchy { File descriptor returned by a previous call to open(). -&return-value-dvb; +RETURN VALUE EBADF @@ -692,37 +692,8 @@ typedef enum fe_hierarchy { The bit error rate is stored into *ber. + &return-value-dvb; - -EBADF - -fd is not a valid open file descriptor. - - -EFAULT - -ber points to invalid address. - - -ENOSIGNAL - -There is no signal, thus no meaningful bit error rate. Also - returned if the front-end is not turned on. - - -ENOSYS - -Function not available for this device. - -
@@ -770,36 +741,6 @@ typedef enum fe_hierarchy { &return-value-dvb; - -EBADF - -fd is not a valid open file descriptor. - - -EFAULT - -snr points to invalid address. - - -ENOSIGNAL - -There is no signal, thus no meaningful signal strength - value. Also returned if front-end is not turned on. - - -ENOSYS - -Function not available for this device. - -
@@ -846,37 +787,8 @@ typedef enum fe_hierarchy { The signal strength value is stored into *strength. + &return-value-dvb; - -EBADF - -fd is not a valid open file descriptor. - - -EFAULT - -status points to invalid address. - - -ENOSIGNAL - -There is no signal, thus no meaningful signal strength - value. Also returned if front-end is not turned on. - - -ENOSYS - -Function not available for this device. - -
@@ -930,29 +842,8 @@ typedef enum fe_hierarchy { so far. + &return-value-dvb; - -EBADF - -fd is not a valid open file descriptor. - - -EFAULT - -ublocks points to invalid address. - - -ENOSYS - -Function not available for this device. - -
@@ -1005,23 +896,10 @@ typedef enum fe_hierarchy { Points to parameters for tuning operation. + &return-value-dvb; -EBADF - -fd is not a valid open file descriptor. - - -EFAULT - -p points to invalid address. - - EINVAL @@ -1078,23 +956,8 @@ typedef enum fe_hierarchy { &return-value-dvb; - -EBADF - -fd is not a valid open file descriptor. - - -EFAULT - -p points to invalid address. - - EINVAL @@ -1181,20 +1044,6 @@ typedef enum fe_hierarchy { &return-value-dvb; -EBADF - -fd is not a valid open file descriptor. - - -EFAULT - -ev points to invalid address. - - EWOULDBLOCK @@ -1206,11 +1055,6 @@ typedef enum fe_hierarchy { EOVERFLOW - - - Overflow in event queue - one or more events were lost. @@ -1264,21 +1108,6 @@ typedef enum fe_hierarchy { &return-value-dvb; - -EBADF - -fd is not a valid open file descriptor. - - -EFAULT - -info points to invalid address. - -
@@ -1322,28 +1151,6 @@ typedef enum fe_hierarchy { &return-value-dvb; - -EBADF - -fd is not a valid file descriptor. - - -EPERM - -Permission denied (needs read/write access). - - -EINTERNAL - -Internal error in the device driver. - -
@@ -1394,43 +1201,6 @@ typedef enum fe_hierarchy { &return-value-dvb; - -EBADF - -fd is not a valid file descriptor. - - -EFAULT - -Seq points to an invalid address. - - -EINVAL - -The data structure referred to by seq is invalid in some - way. - - -EPERM - -Permission denied (needs read/write access). - - -EINTERNAL - -Internal error in the device driver. - -
@@ -1481,43 +1251,6 @@ typedef enum fe_hierarchy { &return-value-dvb; - -EBADF - -fd is not a valid file descriptor. - - -EFAULT - -Seq points to an invalid address. - - -EINVAL - -The data structure referred to by seq is invalid in some - way. - - -EPERM - -Permission denied (needs read/write access). - - -EINTERNAL - -Internal error in the device driver. - -
@@ -1566,43 +1299,6 @@ typedef enum fe_hierarchy { &return-value-dvb; - -EBADF - -fd is not a valid file descriptor. - - -EFAULT - -Seq points to an invalid address. - - -EINVAL - -The data structure referred to by seq is invalid in some - way. - - -EPERM - -Permission denied (needs read/write access). - - -EINTERNAL - -Internal error in the device driver. - -
@@ -1649,42 +1345,6 @@ typedef enum fe_hierarchy { &return-value-dvb; - -ENODEV - -Device driver not loaded/available. - - -EBUSY - -Device or resource busy. - - -EINVAL - -Invalid argument. - - -EPERM - -File not opened with read permissions. - - -EINTERNAL - -Internal error in the device driver. - -
@@ -1733,42 +1393,6 @@ typedef enum fe_hierarchy { &return-value-dvb; - -ENODEV - -Device driver not loaded/available. - - -EBUSY - -Device or resource busy. - - -EINVAL - -Invalid argument. - - -EPERM - -File not opened with read permissions. - - -EINTERNAL - -Internal error in the device driver. - -
@@ -1818,42 +1442,6 @@ typedef enum fe_hierarchy { &return-value-dvb; - -ENODEV - -Device driver not loaded/available. - - -EBUSY - -Device or resource busy. - - -EINVAL - -Invalid argument. - - -EPERM - -File not opened with read permissions. - - -EINTERNAL - -Internal error in the device driver. - -
@@ -1886,10 +1474,6 @@ FE_TUNE_MODE_ONESHOT When set, this flag will disable any zigzagging or other "n &return-value-dvb; - -EINVAL -Invalid argument. -
@@ -1924,11 +1508,6 @@ sends the specified raw cmd to the dish via DISEqC. &return-value-dvb; - - - There are no errors in use for this call - -
diff --git a/Documentation/DocBook/media/v4l/gen-errors.xml b/Documentation/DocBook/media/v4l/gen-errors.xml index 3e6ddd9..dedcc90 100644 --- a/Documentation/DocBook/media/v4l/gen-errors.xml +++ b/Documentation/DocBook/media/v4l/gen-errors.xml @@ -8,7 +8,7 @@ EBADF - fd is not a valid open file descriptor. + The file descriptor is not a valid. EBUSY @@ -21,18 +21,20 @@ EFAULT - fd is not a valid open file descriptor. + There was a failure while copying data from/to userspace. EINVAL - One or more of the ioctl parameters are invalid. This is a widely - error code. see the individual ioctl requests for actual causes. + One or more of the ioctl parameters are invalid or out of the + allowed range. This is a widely error code. See the individual + ioctl requests for specific causes. EINVAL or ENOTTY The ioctl is not supported by the driver, actually meaning that the required functionality is not available, or the file - descriptor is not for a media device. + descriptor is not for a media device. The usage of EINVAL is + deprecated and will be fixed on a latter patch. ENODEV @@ -49,6 +51,17 @@ for periodic transfers (up to 80% of the USB bandwidth). + ENOSYS or EOPNOTSUPP + Function not available for this device (dvb API only. Will likely + be replaced anytime soon by ENOTTY). + + + EPERM + Permission denied. Can be returned if the device needs write + permission, or some special capabilities is needed + (e. g. root) + + EWOULDBLOCK Operation would block. Used when the ioctl would need to wait for an event, but the device was opened in non-blocking mode.