projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50fdf40
)
[media] em28xx: fill in readbuffers and fix incorrect return code
author
Hans Verkuil
<
[email protected]
>
Fri, 7 Sep 2012 09:16:03 +0000
(06:16 -0300)
committer
Mauro Carvalho Chehab
<
[email protected]
>
Sat, 5 Jan 2013 02:52:36 +0000
(
00:52
-0200)
g/s_parm should fill in readbuffers.
For non-webcams s_parm should return -ENOTTY instead of -EINVAL.
Signed-off-by: Hans Verkuil <
[email protected]
>
Signed-off-by: Devin Heitmueller <
[email protected]
>
Signed-off-by: Mauro Carvalho Chehab <
[email protected]
>
drivers/media/usb/em28xx/em28xx-video.c
patch
|
blob
|
history
diff --git
a/drivers/media/usb/em28xx/em28xx-video.c
b/drivers/media/usb/em28xx/em28xx-video.c
index acdb4340399f42bd002d6cb4be6cd8ae7936e1d1..a91a2484bc9886e94e9cdc2ae8eb7addb7fac921 100644
(file)
--- a/
drivers/media/usb/em28xx/em28xx-video.c
+++ b/
drivers/media/usb/em28xx/em28xx-video.c
@@
-972,6
+972,7
@@
static int vidioc_g_parm(struct file *file, void *priv,
if (p->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL;
+ p->parm.capture.readbuffers = EM28XX_MIN_BUF;
if (dev->board.is_webcam)
rc = v4l2_device_call_until_err(&dev->v4l2_dev, 0,
video, g_parm, p);
@@
-989,11
+990,12
@@
static int vidioc_s_parm(struct file *file, void *priv,
struct em28xx *dev = fh->dev;
if (!dev->board.is_webcam)
- return -E
INVAL
;
+ return -E
NOTTY
;
if (p->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL;
+ p->parm.capture.readbuffers = EM28XX_MIN_BUF;
return v4l2_device_call_until_err(&dev->v4l2_dev, 0, video, s_parm, p);
}