Re: [RFC 2/2] vim2m: add media device

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

 



On Tue, 2018-06-12 at 20:44 +0100, emil.velikov@xxxxxxxxxxxxx wrote:
> Hi Ezequiel,  
> 
> On Tue, Jun 12, 2018 at 07:48:27AM -0300, Ezequiel Garcia wrote:
> 
> > @@ -1013,10 +1016,10 @@ static int vim2m_probe(struct
> > platform_device *pdev)
> >  	vfd->lock = &dev->dev_mutex;
> >  	vfd->v4l2_dev = &dev->v4l2_dev;
> >  
> > -	ret = video_register_device(vfd, VFL_TYPE_GRABBER, 0);
> > +	ret = video_register_device(vfd, VFL_TYPE_MEM2MEM, 0);
> 
> Shouldn't the original type be used when building without
> CONFIG_MEDIA_CONTROLLER?
> 

No, the idea was to introduce a new type for mem2mem,
mainly to avoid the video2linux core from registering
mc entities.

Anyway, Hans dislikes this and suggested to drop it.

> 
> > @@ -1050,6 +1076,11 @@ static int vim2m_remove(struct
> > platform_device *pdev)
> >  	struct vim2m_dev *dev = platform_get_drvdata(pdev);
> >  
> >  	v4l2_info(&dev->v4l2_dev, "Removing " MEM2MEM_NAME);
> > +
> > +#ifdef CONFIG_MEDIA_CONTROLLER
> 
> Gut suggests that media_device_unregister() should be called here.
> 
> Then again my experience in media/ is limited so I could be miles off
> ;-)
> 

Good catch, it seems it's indeed missing.

Thanks,
Eze



[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