android_kernel_xiaomi_sm8350/drivers/media/video/cx23885
Trent Piepho f29816bc31 V4L/DVB (11268): cx23885-417: Don't need to zero ioctl parameter fields
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>
2009-03-30 12:43:45 -03:00
..
cimax2.c V4L/DVB (11056): Bug fix in NetUP: restore high address lines in CI 2009-03-30 12:43:24 -03:00
cimax2.h V4L/DVB (10798): Add CIMax(R) SP2 Common Interface code for NetUP Dual DVB-S2 CI card 2009-03-30 12:43:04 -03:00
cx23885-417.c V4L/DVB (11268): cx23885-417: Don't need to zero ioctl parameter fields 2009-03-30 12:43:45 -03:00
cx23885-cards.c V4L/DVB (10805): Add support for NetUP Dual DVB-S2 CI card 2009-03-30 12:43:05 -03:00
cx23885-core.c V4L/DVB (10987): cx23885: fix crash on non-netup cards 2009-03-30 12:43:20 -03:00
cx23885-dvb.c V4L/DVB (10987): cx23885: fix crash on non-netup cards 2009-03-30 12:43:20 -03:00
cx23885-i2c.c
cx23885-reg.h V4L/DVB (10805): Add support for NetUP Dual DVB-S2 CI card 2009-03-30 12:43:05 -03:00
cx23885-vbi.c
cx23885-video.c V4L/DVB (10907): avoid loading the entire videodev.h header on V4L2 drivers 2009-03-30 12:43:15 -03:00
cx23885.h V4L/DVB (10805): Add support for NetUP Dual DVB-S2 CI card 2009-03-30 12:43:05 -03:00
Kconfig V4L/DVB (11127): Kconfig: replace all occurrences of CUSTOMIZE to CUSTOMISE 2009-03-30 12:43:31 -03:00
Makefile V4L/DVB (10805): Add support for NetUP Dual DVB-S2 CI card 2009-03-30 12:43:05 -03:00
netup-eeprom.c V4L/DVB (10797): Add EEPROM code for NetUP Dual DVB-S2 CI card. 2009-03-30 12:43:04 -03:00
netup-eeprom.h V4L/DVB (10797): Add EEPROM code for NetUP Dual DVB-S2 CI card. 2009-03-30 12:43:04 -03:00
netup-init.c V4L/DVB (10796): Add init code for NetUP Dual DVB-S2 CI card 2009-03-30 12:43:04 -03:00
netup-init.h V4L/DVB (10796): Add init code for NetUP Dual DVB-S2 CI card 2009-03-30 12:43:04 -03:00