Re: [PATCH v2] media: v4l2-subdev: Add new ioctl for client capabilities

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

 



Moi,

On Tue, Mar 21, 2023 at 11:25:04AM +0200, Tomi Valkeinen wrote:
> On 21/03/2023 10:43, Hans Verkuil wrote:
> > > @@ -250,6 +268,9 @@ struct v4l2_subdev_routing {
> > >   #define VIDIOC_SUBDEV_S_SELECTION		_IOWR('V', 62, struct v4l2_subdev_selection)
> > >   #define VIDIOC_SUBDEV_G_ROUTING			_IOWR('V', 38, struct v4l2_subdev_routing)
> > >   #define VIDIOC_SUBDEV_S_ROUTING			_IOWR('V', 39, struct v4l2_subdev_routing)
> > > +#define VIDIOC_SUBDEV_G_CLIENT_CAP		_IOR('V',  101, struct v4l2_subdev_client_capability)
> > > +#define VIDIOC_SUBDEV_S_CLIENT_CAP		_IOWR('V',  102, struct v4l2_subdev_client_capability)
> > 
> > Can't we just use __u64 as the ioctl type? Do we need to wrap it inside a struct?
> 
> We could, but then we need to pass a pointer to the u64 so that the kernel
> can modify it (for VIDIOC_SUBDEV_S_CLIENT_CAP). I personally find it more
> clear from the perspective of a user to use a struct here, instead of
> passing a generic u64 pointer. Also, all the other ioctls use a struct.
> 
> So, I'm fine either way, but personally I like this one.

I prefer it the way it is.

-- 
Sakari Ailus



[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