All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging/most/video: set device_caps in struct video_device
@ 2019-06-26  7:52 Hans Verkuil
  2019-06-26  8:19 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Verkuil @ 2019-06-26  7:52 UTC (permalink / raw)
  To: Andrey Shvetsov; +Cc: Linux Media Mailing List, Greg Kroah-Hartman

Instead of filling in the struct v4l2_capability device_caps
field, fill in the struct video_device device_caps field.

That way the V4L2 core knows what the capabilities of the
video device are.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
---
Hi Andrey,

I noticed this new staging V4L2 driver. FYI, please CC any future patches to
this driver to the linux-media@vger.kernel.org mailinglist as well so we can
review it. I'll post a review of this driver later today as well. In the
meantime, I'd like to get this patch in since during the upcoming 5.4 cycle
we will require that the device_caps field of struct video_device is set
correctly.

Greg, do you want to take this patch? After Andrey Acks it, of course.

Regards,

	Hans
---
diff --git a/drivers/staging/most/video/video.c b/drivers/staging/most/video/video.c
index adca250062e1..7d12ab6c60a1 100644
--- a/drivers/staging/most/video/video.c
+++ b/drivers/staging/most/video/video.c
@@ -250,11 +250,6 @@ static int vidioc_querycap(struct file *file, void *priv,
 	strlcpy(cap->card, "MOST", sizeof(cap->card));
 	snprintf(cap->bus_info, sizeof(cap->bus_info),
 		 "%s", mdev->iface->description);
-
-	cap->capabilities =
-		V4L2_CAP_READWRITE |
-		V4L2_CAP_TUNER |
-		V4L2_CAP_VIDEO_CAPTURE;
 	return 0;
 }

@@ -366,6 +361,8 @@ static const struct video_device comp_videodev_template = {
 	.release = video_device_release,
 	.ioctl_ops = &video_ioctl_ops,
 	.tvnorms = V4L2_STD_UNKNOWN,
+	.device_caps = V4L2_CAP_READWRITE | V4L2_CAP_TUNER |
+		       V4L2_CAP_VIDEO_CAPTURE,
 };

 /**************************************************************************/

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] staging/most/video: set device_caps in struct video_device
  2019-06-26  7:52 [PATCH] staging/most/video: set device_caps in struct video_device Hans Verkuil
@ 2019-06-26  8:19 ` Greg Kroah-Hartman
  2019-06-26  8:28   ` Hans Verkuil
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Kroah-Hartman @ 2019-06-26  8:19 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: Andrey Shvetsov, Linux Media Mailing List

On Wed, Jun 26, 2019 at 09:52:49AM +0200, Hans Verkuil wrote:
> Instead of filling in the struct v4l2_capability device_caps
> field, fill in the struct video_device device_caps field.
> 
> That way the V4L2 core knows what the capabilities of the
> video device are.
> 
> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> ---
> Hi Andrey,
> 
> I noticed this new staging V4L2 driver. FYI, please CC any future patches to
> this driver to the linux-media@vger.kernel.org mailinglist as well so we can
> review it. I'll post a review of this driver later today as well. In the
> meantime, I'd like to get this patch in since during the upcoming 5.4 cycle
> we will require that the device_caps field of struct video_device is set
> correctly.
> 
> Greg, do you want to take this patch? After Andrey Acks it, of course.

Yes, I will be glad to take it.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] staging/most/video: set device_caps in struct video_device
  2019-06-26  8:19 ` Greg Kroah-Hartman
@ 2019-06-26  8:28   ` Hans Verkuil
  0 siblings, 0 replies; 3+ messages in thread
From: Hans Verkuil @ 2019-06-26  8:28 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Andrey Shvetsov, Linux Media Mailing List

On 6/26/19 10:19 AM, Greg Kroah-Hartman wrote:
> On Wed, Jun 26, 2019 at 09:52:49AM +0200, Hans Verkuil wrote:
>> Instead of filling in the struct v4l2_capability device_caps
>> field, fill in the struct video_device device_caps field.
>>
>> That way the V4L2 core knows what the capabilities of the
>> video device are.
>>
>> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
>> ---
>> Hi Andrey,
>>
>> I noticed this new staging V4L2 driver. FYI, please CC any future patches to
>> this driver to the linux-media@vger.kernel.org mailinglist as well so we can
>> review it. I'll post a review of this driver later today as well. In the
>> meantime, I'd like to get this patch in since during the upcoming 5.4 cycle
>> we will require that the device_caps field of struct video_device is set
>> correctly.
>>
>> Greg, do you want to take this patch? After Andrey Acks it, of course.
> 
> Yes, I will be glad to take it.

I'll post a v2 in a minute :-)

While reviewing the driver I found another issue in this code.

Regards,

	Hans

> 
> thanks,
> 
> greg k-h
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-06-26  8:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-26  7:52 [PATCH] staging/most/video: set device_caps in struct video_device Hans Verkuil
2019-06-26  8:19 ` Greg Kroah-Hartman
2019-06-26  8:28   ` Hans Verkuil

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.