Re: [PATCH] drivers/media: don't set pix->priv = 0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/26/19 3:55 PM, Laurent Pinchart wrote:
> Hi Hans,
> 
> Thank you for the patch.
> 
> On Wed, Jun 26, 2019 at 11:58:02AM +0200, Hans Verkuil wrote:
>> The priv field of struct v4l2_pix_format shouldn't be set by drivers,
>> it's set by the v4l2 core instead to V4L2_PIX_FMT_PRIV_MAGIC.
>>
>> Drop this from the few media drivers that still do this.
>>
>> Note that the gspca patch is slightly more involved since some of the
>> sub-gspca drivers use the priv field internally.
> 
> Do they use it in a non-standard way towards userspace, or just for
> communication with the gspca driver within the kernel ? In the former
> case, are you aware of applications using that ?

It's totally internal to the gspca driver.

In any case, priv is always overwritten with V4L2_PIX_FMT_PRIV_MAGIC
by the v4l2 core so you can't use it in a public API anyway.

Regards,

	Hans

> 
>> Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
> 
> For everything but gspca,
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux