public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-media@vger.kernel.org, sakari.ailus@maxwell.research.nokia.com
Subject: Re: [RFC/PATCH v2 7/7] v4l: subdev: Generic ioctl support
Date: Sat, 10 Jul 2010 11:08:46 -0300	[thread overview]
Message-ID: <4C387EEE.3000108@redhat.com> (raw)
In-Reply-To: <1278689512-30849-8-git-send-email-laurent.pinchart@ideasonboard.com>

Em 09-07-2010 12:31, Laurent Pinchart escreveu:
> Instead of returning an error when receiving an ioctl call with an
> unsupported command, forward the call to the subdev core::ioctl handler.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  Documentation/video4linux/v4l2-framework.txt |    5 +++++
>  drivers/media/video/v4l2-subdev.c            |    2 +-
>  2 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt
> index 89bd881..581e7db 100644
> --- a/Documentation/video4linux/v4l2-framework.txt
> +++ b/Documentation/video4linux/v4l2-framework.txt
> @@ -365,6 +365,11 @@ VIDIOC_UNSUBSCRIBE_EVENT
>  	To properly support events, the poll() file operation is also
>  	implemented.
>  
> +Private ioctls
> +
> +	All ioctls not in the above list are passed directly to the sub-device
> +	driver through the core::ioctl operation.
> +
>  
>  I2C sub-device drivers
>  ----------------------
> diff --git a/drivers/media/video/v4l2-subdev.c b/drivers/media/video/v4l2-subdev.c
> index 31bec67..ce47772 100644
> --- a/drivers/media/video/v4l2-subdev.c
> +++ b/drivers/media/video/v4l2-subdev.c
> @@ -120,7 +120,7 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg)
>  		return v4l2_subdev_call(sd, core, unsubscribe_event, fh, arg);
>  
>  	default:
> -		return -ENOIOCTLCMD;
> +		return v4l2_subdev_call(sd, core, ioctl, cmd, arg);
>  	}
>  
>  	return 0;

Hmm... private ioctls at subdev... I'm not sure if I like this idea. I prefer to merge this patch
only after having a driver actually needing it, after discussing why not using a standard ioctl
for that driver.

Cheers,
Mauro.

  reply	other threads:[~2010-07-10 14:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-09 15:31 [RFC/PATCH v2 0/7] V4L2 subdev userspace API Laurent Pinchart
2010-07-09 15:31 ` [RFC/PATCH v2 1/7] v4l: subdev: Don't require core operations Laurent Pinchart
2010-07-09 15:31 ` [RFC/PATCH v2 2/7] v4l: Merge v4l2_i2c_new_subdev_cfg and v4l2_i2c_new_subdev Laurent Pinchart
2010-07-09 15:31 ` [RFC/PATCH v2 3/7] v4l: subdev: Add device node support Laurent Pinchart
2010-07-09 15:31 ` [RFC/PATCH v2 4/7] v4l: subdev: Uninline the v4l2_subdev_init function Laurent Pinchart
2010-07-09 15:31 ` [RFC/PATCH v2 5/7] v4l: subdev: Control ioctls support Laurent Pinchart
2010-07-09 15:31 ` [RFC/PATCH v2 6/7] v4l: subdev: Events support Laurent Pinchart
2010-07-10 13:59   ` Mauro Carvalho Chehab
2010-07-12 11:06     ` Sakari Ailus
2010-07-12 11:37       ` Laurent Pinchart
2010-07-09 15:31 ` [RFC/PATCH v2 7/7] v4l: subdev: Generic ioctl support Laurent Pinchart
2010-07-10 14:08   ` Mauro Carvalho Chehab [this message]
2010-07-10 16:31     ` Hans Verkuil
2010-07-10 17:23       ` Mauro Carvalho Chehab
2010-07-12  9:33   ` Pawel Osciak
2010-07-12 11:39     ` Laurent Pinchart
2010-07-10 16:38 ` [RFC/PATCH v2 0/7] V4L2 subdev userspace API Hans Verkuil

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=4C387EEE.3000108@redhat.com \
    --to=mchehab@redhat.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=sakari.ailus@maxwell.research.nokia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox