Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 261431
b: refs/heads/master
c: 9190d19
h: refs/heads/master
i:
  261429: c6890df
  261427: 3322ddf
  261423: f0c89a0
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Jul 27, 2011
1 parent cfb7738 commit bb1f67e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c28f53f6cd45de5cefe8dc7479236b745b97d49c
refs/heads/master: 9190d191b1b814dfb488125b54cf0de6eedd9220
13 changes: 6 additions & 7 deletions trunk/Documentation/DocBook/media/v4l/gen-errors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@
allowed range. This is a widely used error code. See the individual
ioctl requests for specific causes.</entry>
</row>
<row>
<entry>EINVAL or ENOTTY</entry>
<entry>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. The usage of EINVAL is
deprecated and will be fixed on a latter patch.</entry>
</row>
<row>
<entry>ENODEV</entry>
<entry>Device not found or was removed.</entry>
Expand All @@ -45,6 +38,12 @@
<entry>ENOMEM</entry>
<entry>There's not enough memory to handle the desired operation.</entry>
</row>
<row>
<entry>ENOTTY</entry>
<entry>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.</entry>
</row>
<row>
<entry>ENOSPC</entry>
<entry>On USB devices, the stream ioctl's can return this error, meaning
Expand Down
2 changes: 2 additions & 0 deletions trunk/Documentation/DocBook/media/v4l/v4l2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ applications. -->
<date>2011-06-27</date>
<authorinitials>mcc, po</authorinitials>
<revremark>Documented that VIDIOC_QUERYCAP now returns a per-subsystem version instead of a per-driver one.</revremark>
<revremark>Standardize an error code for invalid ioctl.</revremark>
</revision>

<revision>
<revnumber>2.6.39</revnumber>
<date>2011-03-01</date>
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/media/video/v4l2-ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -543,12 +543,12 @@ static long __video_do_ioctl(struct file *file,
struct v4l2_fh *vfh = NULL;
struct v4l2_format f_copy;
int use_fh_prio = 0;
long ret = -EINVAL;
long ret = -ENOTTY;

if (ops == NULL) {
printk(KERN_WARNING "videodev: \"%s\" has no ioctl_ops.\n",
vfd->name);
return -EINVAL;
return ret;
}

if ((vfd->debug & V4L2_DEBUG_IOCTL) &&
Expand Down

0 comments on commit bb1f67e

Please sign in to comment.