Re: [PATCH 1/6] media: v4l: subdev: Store the number of pads in sub-device state

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

 



On Fri, Oct 13, 2023 at 02:15:07PM +0300, Laurent Pinchart wrote:
> On Fri, Oct 13, 2023 at 11:06:08AM +0000, Sakari Ailus wrote:
> > On Fri, Oct 13, 2023 at 01:57:49PM +0300, Laurent Pinchart wrote:
> > > On Fri, Oct 13, 2023 at 01:44:19PM +0300, Sakari Ailus wrote:
> > > > Store the number of pads in the sub-device state. This will be needed to
> > > > validate pad when retrieving information for non-stream-aware users.
> > > 
> > > I'd rather store a pointer to the subdev. You can get the number of pads
> > > from there.
> > 
> > The value is initialised after the array is allocated so this won't change.
> > 
> > I don't have a strong opinion either way. It's still more efficient to
> > store just the value.
> 
> Slightly so, but I don't think it will matter in practice. I believe
> we'll have more needs to access the subdev from the state in the future,
> which is why I'd rather store the pointer already.

Fair enough, I'll make it a sub-device pointer.

-- 
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