All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org, laurent.pinchart@ideasonboard.com,
	iivanov@mm-sol.com, gururaj.nagendra@intel.com
Subject: Re: [RFC v2 1/7] V4L: File handles
Date: Fri, 22 Jan 2010 18:43:07 +0200	[thread overview]
Message-ID: <4B59D59B.3030504@maxwell.research.nokia.com> (raw)
In-Reply-To: <alpine.LNX.2.01.1001181330300.31857@alastor>

Hans Verkuil wrote:
> Hi Sakari,

Hi Hans!

> I should have reviewed this weeks ago, but better late than never...

No problem, and thanks for the review!

> On Tue, 22 Dec 2009, Sakari Ailus wrote:
> 
>> This patch adds a list of v4l2_fh structures to every video_device.
>> It allows using file handle related information in V4L2. The event
>> interface
>> is one example of such use.
>>
>> Video device drivers should use the v4l2_fh pointer as their
>> file->private_data.
>>
>> Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
>> ---
>> drivers/media/video/Makefile   |    2 +-
>> drivers/media/video/v4l2-dev.c |    2 +
>> drivers/media/video/v4l2-fh.c  |   57
>> ++++++++++++++++++++++++++++++++++++++++
>> include/media/v4l2-dev.h       |    4 +++
>> include/media/v4l2-fh.h        |   41 ++++++++++++++++++++++++++++
>> 5 files changed, 105 insertions(+), 1 deletions(-)
>> create mode 100644 drivers/media/video/v4l2-fh.c
>> create mode 100644 include/media/v4l2-fh.h
>>
>> diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
>> index a61e3f3..1947146 100644
>> --- a/drivers/media/video/Makefile
>> +++ b/drivers/media/video/Makefile
>> @@ -10,7 +10,7 @@ stkwebcam-objs    :=    stk-webcam.o stk-sensor.o
>>
>> omap2cam-objs    :=    omap24xxcam.o omap24xxcam-dma.o
>>
>> -videodev-objs    :=    v4l2-dev.o v4l2-ioctl.o v4l2-device.o
>> +videodev-objs    :=    v4l2-dev.o v4l2-ioctl.o v4l2-device.o v4l2-fh.o
>>
>> # V4L2 core modules
>>
>> diff --git a/drivers/media/video/v4l2-dev.c
>> b/drivers/media/video/v4l2-dev.c
>> index 7090699..15b2ac8 100644
>> --- a/drivers/media/video/v4l2-dev.c
>> +++ b/drivers/media/video/v4l2-dev.c
>> @@ -421,6 +421,8 @@ static int __video_register_device(struct
>> video_device *vdev, int type, int nr,
>>     if (!vdev->release)
>>         return -EINVAL;
>>
>> +    v4l2_fh_init(vdev);
>> +
>>     /* Part 1: check device type */
>>     switch (type) {
>>     case VFL_TYPE_GRABBER:
>> diff --git a/drivers/media/video/v4l2-fh.c
>> b/drivers/media/video/v4l2-fh.c
>> new file mode 100644
>> index 0000000..406e4ac
>> --- /dev/null
>> +++ b/drivers/media/video/v4l2-fh.c
>> @@ -0,0 +1,57 @@
>> +/*
>> + * drivers/media/video/v4l2-fh.c
>> + *
>> + * V4L2 file handles.
>> + *
>> + * Copyright (C) 2009 Nokia Corporation.
>> + *
>> + * Contact: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
>> + *
>> + * This program is free software; you can redistribute it and/or
>> + * modify it under the terms of the GNU General Public License
>> + * version 2 as published by the Free Software Foundation.
>> + *
>> + * This program is distributed in the hope that it will be useful, but
>> + * WITHOUT ANY WARRANTY; without even the implied warranty of
>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
>> + * General Public License for more details.
>> + *
>> + * You should have received a copy of the GNU General Public License
>> + * along with this program; if not, write to the Free Software
>> + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
>> + * 02110-1301 USA
>> + */
>> +
>> +#include <media/v4l2-dev.h>
>> +#include <media/v4l2-fh.h>
>> +
>> +#include <linux/sched.h>
>> +#include <linux/vmalloc.h>
> 
> Weird includes. I would expect to see only spinlock.h and list.h to be
> included
> here.

Oops. They're clearly leftovers from somewhere else. Turns out even
those are not needed.

-- 
Sakari Ailus
sakari.ailus@maxwell.research.nokia.com

  reply	other threads:[~2010-01-22 16:43 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-22 16:42 [RFC v2 0/7] V4L2 file handles and event interface Sakari Ailus
2009-12-22 16:43 ` [RFC v2 1/7] V4L: File handles Sakari Ailus
2009-12-22 16:43   ` [RFC v2 2/7] V4L: Events: Add new ioctls for events Sakari Ailus
2009-12-22 16:43     ` [RFC v2 3/7] V4L: Events: Support event handling in do_ioctl Sakari Ailus
2009-12-22 16:43       ` [RFC v2 4/7] V4L: Events: Add backend Sakari Ailus
2009-12-22 16:43         ` [RFC v2 5/7] V4L: Events: Limit event queue length Sakari Ailus
2009-12-22 16:43           ` [RFC v2 6/7] V4L: Events: Sequence numbers Sakari Ailus
2009-12-22 16:43             ` [RFC v2 7/7] V4L: Events: Support all events Sakari Ailus
2010-01-18 12:48             ` [RFC v2 6/7] V4L: Events: Sequence numbers Hans Verkuil
2010-01-18 12:58           ` [RFC v2 5/7] V4L: Events: Limit event queue length Hans Verkuil
2010-01-19  8:11             ` Laurent Pinchart
2010-01-19  9:03               ` Hans Verkuil
2010-01-24 13:06             ` Sakari Ailus
2009-12-23  1:01         ` [RFC v2 4/7] V4L: Events: Add backend Andy Walls
2009-12-23 10:15           ` Sakari Ailus
2010-01-18 12:43         ` Hans Verkuil
2010-01-22 17:10           ` Sakari Ailus
2010-01-18 12:32   ` [RFC v2 1/7] V4L: File handles Hans Verkuil
2010-01-22 16:43     ` Sakari Ailus [this message]
2010-01-18 13:07 ` [RFC v2 0/7] V4L2 file handles and event interface Hans Verkuil
2010-01-19  8:23   ` Laurent Pinchart
2010-01-19  9:06     ` 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=4B59D59B.3030504@maxwell.research.nokia.com \
    --to=sakari.ailus@maxwell.research.nokia.com \
    --cc=gururaj.nagendra@intel.com \
    --cc=hverkuil@xs4all.nl \
    --cc=iivanov@mm-sol.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    /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.