lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201011251537.52329.laurent.pinchart@ideasonboard.com>
Date:	Thu, 25 Nov 2010 15:37:51 +0100
From:	Laurent Pinchart <laurent.pinchart@...asonboard.com>
To:	Hans Verkuil <hverkuil@...all.nl>
Cc:	linux-media@...r.kernel.org, linux-omap@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	sakari.ailus@...well.research.nokia.com,
	broonie@...nsource.wolfsonmicro.com, lennart@...ttering.net
Subject: Re: [RFC/PATCH v6 11/12] v4l: Make video_device inherit from media_entity

Hi Hans,

Thanks for the review.

On Thursday 25 November 2010 12:38:15 Hans Verkuil wrote:
> On Thursday, November 25, 2010 03:28:18 Laurent Pinchart wrote:
> > V4L2 devices are media entities. As such they need to inherit from
> > (include) the media_entity structure.
> > 
> > When registering/unregistering the device, the media entity is
> > automatically registered/unregistered. The entity is acquired on device
> > open and released on device close.
> > 
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>
> > Signed-off-by: Sakari Ailus <sakari.ailus@...well.research.nokia.com>
> > ---
> > 
> >  Documentation/video4linux/v4l2-framework.txt |   38
> >  +++++++++++++++++++-- drivers/media/video/v4l2-dev.c               |  
> >  47 +++++++++++++++++++++++--- include/media/v4l2-dev.h                 
> >     |    7 ++++
> >  3 files changed, 84 insertions(+), 8 deletions(-)
> 
> <snip>
> 
> > diff --git a/drivers/media/video/v4l2-dev.c
> > b/drivers/media/video/v4l2-dev.c index 035db52..511e1ee 100644
> > --- a/drivers/media/video/v4l2-dev.c
> > +++ b/drivers/media/video/v4l2-dev.c

[snip]

> > @@ -558,12 +579,25 @@ int __video_register_device(struct video_device
> > *vdev, int type, int nr,
> > 
> >  	if (nr != -1 && nr != vdev->num && warn_if_nr_in_use)
> >  	
> >  		printk(KERN_WARNING "%s: requested %s%d, got %s\n", __func__,
> >  		
> >  			name_base, nr, video_device_node_name(vdev));
> > 
> > -
> > -	/* Part 5: Activate this minor. The char device can now be used. */
> > +#if defined(CONFIG_MEDIA_CONTROLLER)
> > +	/* Part 5: Register the entity. */
> > +	if (vdev->v4l2_dev && vdev->v4l2_dev->mdev) {
> > +		vdev->entity.type = MEDIA_ENTITY_TYPE_NODE_V4L;
> > +		vdev->entity.name = vdev->name;
> > +		vdev->entity.v4l.major = VIDEO_MAJOR;
> > +		vdev->entity.v4l.minor = vdev->minor;
> > +		ret = media_device_register_entity(vdev->v4l2_dev->mdev,
> > +			&vdev->entity);
> > +		if (ret < 0)
> > +			printk(KERN_ERR "error\n"); /* TODO */
> 
> Was this forgotten, or will this be fixed in the next version? It looks
> out-of-place...

OOPS. I totally forgot about that one. I'll fix it for the next version.

-- 
Regards,

Laurent Pinchart
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ