forked from Minki/linux
f29816bc31
The v4l2 core code in v4l2_ioctl will zero out the structure the driver is supposed to fill in for read-only ioctls. For read/write ioctls, all the fields which aren't supplied from userspace will be zeroed out. Zeroing code is removed from enum_input, g_tuner, g_frequency, querycap, enum_fmt_vid_cap, g_fmt_vid_cap, and try_fmt_vid_cap. The ->vidioc_(s|g|try|enum)_fmt_vid_cap() methods are only called on VIDEO_CAPTURE buffers. Thus, there is no need to check or set the buffer's 'type' field since it must already be set to VIDEO_CAPTURE. There also appeared to be a copy and paste error in vidioc_try_fmt_vid_cap() that would set f->fmt.pix.sizeimage to zero. Note that the s_fmt_vid_cap method doesn't appear to actually do anything. Whatever parameters were requested are just silently ignored. Was this intentional? Who knows, as the commit log entry for the driver just says, "Add generic cx23417 hardware encoder support." There are no docs. A comment like "this driver totally ignores the v4l2 spec w.r.t. VIDIOC_S_FMT because ..." would have gone a long way. Cc: Steven Toth <stoth@hauppauge.com> Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> |
||
---|---|---|
.. | ||
cimax2.c | ||
cimax2.h | ||
cx23885-417.c | ||
cx23885-cards.c | ||
cx23885-core.c | ||
cx23885-dvb.c | ||
cx23885-i2c.c | ||
cx23885-reg.h | ||
cx23885-vbi.c | ||
cx23885-video.c | ||
cx23885.h | ||
Kconfig | ||
Makefile | ||
netup-eeprom.c | ||
netup-eeprom.h | ||
netup-init.c | ||
netup-init.h |