All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: linux-media@vger.kernel.org, hverkuil@xs4all.nl
Subject: Re: [PATCH 3/3] v4l: ioctl: Set bus_info in v4l_querycap()
Date: Mon, 24 Jan 2022 18:23:12 +0200	[thread overview]
Message-ID: <Ye7ScPzWH20vDv3Z@pendragon.ideasonboard.com> (raw)
In-Reply-To: <Ye7Ns4UMUUDpB3AM@paasikivi.fi.intel.com>

On Mon, Jan 24, 2022 at 06:02:59PM +0200, Sakari Ailus wrote:
> Hi Laurent,
> 
> On Sun, Jan 23, 2022 at 01:51:10AM +0200, Laurent Pinchart wrote:
> 
> ...
> 
> > > diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
> > > index 642cb90f457c..81ebf6cca522 100644
> > > --- a/drivers/media/v4l2-core/v4l2-ioctl.c
> > > +++ b/drivers/media/v4l2-core/v4l2-ioctl.c
> > > @@ -18,6 +18,7 @@
> > >  
> > >  #include <linux/videodev2.h>
> > >  
> > > +#include <media/media-device.h> /* for media_set_bus_info() */
> > >  #include <media/v4l2-common.h>
> > >  #include <media/v4l2-ioctl.h>
> > >  #include <media/v4l2-ctrls.h>
> > > @@ -1069,6 +1070,8 @@ static int v4l_querycap(const struct v4l2_ioctl_ops *ops,
> > >  	cap->capabilities |= V4L2_CAP_EXT_PIX_FORMAT;
> > >  	cap->device_caps |= V4L2_CAP_EXT_PIX_FORMAT;
> > >  
> > > +	media_set_bus_info(cap->bus_info, vfd->dev_parent);
> > > +
> > 
> > Shouldn't you do this before calling the driver operation, if you want
> > to allow driver overrides ?
> 
> This is done conditionally based on the value of the first byte.

I had missed that.

Isn't it still better to call media_set_bus_info() first, instead of
checking the first byte ?

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2022-01-24 16:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-22 16:36 [PATCH 0/3] Set bus_info field in framework Sakari Ailus
2022-01-22 16:36 ` [PATCH 1/3] media: Provide a helper for setting bus_info field Sakari Ailus
2022-01-22 23:44   ` Laurent Pinchart
2022-01-24 15:55     ` Sakari Ailus
2022-01-25 12:54   ` Hans Verkuil
2022-01-26 16:07     ` Sakari Ailus
2022-01-22 16:36 ` [PATCH 2/3] media: Set bus_info in media_device_init() Sakari Ailus
2022-01-22 23:48   ` Laurent Pinchart
2022-01-24 15:59     ` Sakari Ailus
2022-01-24 16:21       ` Laurent Pinchart
2022-01-22 16:36 ` [PATCH 3/3] v4l: ioctl: Set bus_info in v4l_querycap() Sakari Ailus
2022-01-22 23:51   ` Laurent Pinchart
2022-01-24 16:02     ` Sakari Ailus
2022-01-24 16:23       ` Laurent Pinchart [this message]
2022-01-24 16:47         ` Sakari Ailus
2022-01-24 22:23   ` kernel test robot
2022-01-24 22:23     ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Ye7ScPzWH20vDv3Z@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.