Re: [PATCH v2 4/4] v4l: ioctl: Set bus_info in v4l_querycap()

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

 



Hi Sakari,

On Fri, Jan 28, 2022 at 06:35:59PM +0200, Sakari Ailus wrote:
> On Fri, Jan 28, 2022 at 06:30:33PM +0200, Laurent Pinchart wrote:
> > On Fri, Jan 28, 2022 at 06:07:36PM +0200, Sakari Ailus wrote:
> > > On Fri, Jan 28, 2022 at 04:58:40PM +0200, Laurent Pinchart wrote:
> > > > Hi Sakari,
> > > > 
> > > > Thank you for the patch.
> > > 
> > > And thanks for the review!
> > > 
> > > > On Fri, Jan 28, 2022 at 10:33:09AM +0200, Sakari Ailus wrote:
> > > > > The bus_info field is set by most drivers based on the type of the device
> > > > > bus as well as the name of the device. Do this in v4l_querycap() so
> > > > > drivers don't need to. This keeps compatibility with non-default and silly
> > > > > bus_info.
> > > > 
> > > > Do we have many PCI or platform drivers with non-default bus_info ?
> > > 
> > > Quite a few actually. Most have something static in bus_info and there are
> > > also PCI Express devices that use "PCIe:" prefix. These are mostly old
> > > drivers though. I've left them as-is.
> > > 
> > > New drivers shouldn't bother changing the default unless there's a good
> > > reason to do that.
> > 
> > Let's make it very clear in the documentation then.
> 
> Right now there's no place for documenting this. Basically this is about
> what IOCTL argument struct fields are set in the framework and which ones
> the driver is responsible for. I don't think addressing that belongs to
> this set.

As this sets tries to fix the mess caused by drivers using semi-random
bus_info, I'd like to disagree :-) It can be done in a patch on top.

-- 
Regards,

Laurent Pinchart



[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