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. -- Regards, Laurent Pinchart