v4l2-ioctl.c: prefill tuner type for g_frequency and g/s_tuner
commit4f378612389839ed7fa00ad1dad4533bb4008395
authorHans Verkuil <hans.verkuil@cisco.com>
Sun, 12 Jun 2011 09:36:41 +0000 (12 06:36 -0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 3 Aug 2011 19:42:30 +0000 (3 12:42 -0700)
treeff1fde354594dd3c9dba23ebd9151f23aad24c6b
parent18afcab7581b876e5673d9c305516a42b2644dd2
v4l2-ioctl.c: prefill tuner type for g_frequency and g/s_tuner

commit 227690df75382e46a4f6ea1bbc5df855a674b47f upstream.

The subdevs are supposed to receive a valid tuner type for the g_frequency
and g/s_tuner subdev ops. Some drivers do this, others don't. So prefill
this in v4l2-ioctl.c based on whether the device node from which this is
called is a radio node or not.

The spec does not require applications to fill in the type, and if they
leave it at 0 then the 'check_mode' call in tuner-core.c will return
an error and the ioctl does nothing.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/media/video/v4l2-ioctl.c