[media] media: davinci: vpif: set device capabilities
set device_caps and also change the driver and bus_info to proper values as per standard. Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com> Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
b4a711e7bf
commit
626d533f8c
|
@ -1635,9 +1635,11 @@ static int vpif_querycap(struct file *file, void *priv,
|
||||||
{
|
{
|
||||||
struct vpif_capture_config *config = vpif_dev->platform_data;
|
struct vpif_capture_config *config = vpif_dev->platform_data;
|
||||||
|
|
||||||
cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;
|
cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;
|
||||||
strlcpy(cap->driver, "vpif capture", sizeof(cap->driver));
|
cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
|
||||||
strlcpy(cap->bus_info, "VPIF Platform", sizeof(cap->bus_info));
|
snprintf(cap->driver, sizeof(cap->driver), "%s", dev_name(vpif_dev));
|
||||||
|
snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:%s",
|
||||||
|
dev_name(vpif_dev));
|
||||||
strlcpy(cap->card, config->card_name, sizeof(cap->card));
|
strlcpy(cap->card, config->card_name, sizeof(cap->card));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -827,9 +827,11 @@ static int vpif_querycap(struct file *file, void *priv,
|
||||||
{
|
{
|
||||||
struct vpif_display_config *config = vpif_dev->platform_data;
|
struct vpif_display_config *config = vpif_dev->platform_data;
|
||||||
|
|
||||||
cap->capabilities = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING;
|
cap->device_caps = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING;
|
||||||
strlcpy(cap->driver, "vpif display", sizeof(cap->driver));
|
cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
|
||||||
strlcpy(cap->bus_info, "Platform", sizeof(cap->bus_info));
|
snprintf(cap->driver, sizeof(cap->driver), "%s", dev_name(vpif_dev));
|
||||||
|
snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:%s",
|
||||||
|
dev_name(vpif_dev));
|
||||||
strlcpy(cap->card, config->card_name, sizeof(cap->card));
|
strlcpy(cap->card, config->card_name, sizeof(cap->card));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue