diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-09-28 18:39:32 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-12-18 11:49:40 -0500 |
commit | 4839c58f034ae41e2dfdd097240a69622cab4c73 (patch) | |
tree | f1cff35db563349cdfe99fa0c5621e185262ff47 /drivers/media/usb/pvrusb2 | |
parent | 2120961f0cd71837e889a84e93dc54b647400c4e (diff) | |
download | linux-4839c58f034ae41e2dfdd097240a69622cab4c73.tar.gz linux-4839c58f034ae41e2dfdd097240a69622cab4c73.tar.bz2 linux-4839c58f034ae41e2dfdd097240a69622cab4c73.zip |
media: v4l2-dev: convert VFL_TYPE_* into an enum
Using enums makes easier to document, as it can use kernel-doc
markups. It also allows cross-referencing, with increases the
kAPI readability.
Please notice that now cx88_querycap() has to have a default for
the VFL type, as there are more types than supported by the driver.
Acked-By: Mike Isely <isely@pobox.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/usb/pvrusb2')
-rw-r--r-- | drivers/media/usb/pvrusb2/pvrusb2-v4l2.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c index 4320bda9352d..864830d4c741 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c @@ -153,6 +153,8 @@ static int pvr2_querycap(struct file *file, void *priv, struct v4l2_capability * case VFL_TYPE_RADIO: cap->device_caps = V4L2_CAP_RADIO; break; + default: + return -EINVAL; } cap->device_caps |= V4L2_CAP_TUNER | V4L2_CAP_READWRITE; return 0; |