RE: [PATCH 1/1] V4L/v4l2-dev: Make 'videodev_init' as a subsys initcall

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

 



Hi Laurent,

Thanks for your review comments.

> -----Original Message-----
> From: Laurent Pinchart [mailto:laurent.pinchart@xxxxxxxxxxxxxxxx]
> Sent: Monday, March 12, 2012 3:35 PM
> To: Bhupesh SHARMA
> Cc: linux-media@xxxxxxxxxxxxxxx; spear-devel
> Subject: Re: [PATCH 1/1] V4L/v4l2-dev: Make 'videodev_init' as a subsys
> initcall
> 
> Hi Bhupesh,
> 
> Thanks for the patch.
> 
> On Monday 12 March 2012 14:39:02 Bhupesh Sharma wrote:
> > As the V4L2 based UVC webcam gadget (g_webcam) expects the
> > 'videodev' to present when the 'webcam_bind' routine is called,
> > so 'videodev' should be available as early as possible.
> >
> > Now, when 'g_webcam' is built as a module (i.e. not a part of
> > kernel) the late availability of 'videodev' is OK, but if
> > 'g_webcam' is built statically as a part of the kernel,
> > the kernel crashes (a sample crash dump using Designware 2.0 UDC
> > is provided below).
> >
> > To solve the same, this patch makes 'videodev_init' as a subsys
> initcall.
> >
> > Kernel Crash Dump:
> > ------------------
> 
> [snip]
> 
> > Signed-off-by: Bhupesh Sharma <bhupesh.sharma@xxxxxx>
> > ---
> >  drivers/media/video/v4l2-dev.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/media/video/v4l2-dev.c
> b/drivers/media/video/v4l2-dev.c
> > index 96e9615..041804b 100644
> > --- a/drivers/media/video/v4l2-dev.c
> > +++ b/drivers/media/video/v4l2-dev.c
> > @@ -788,7 +788,7 @@ static void __exit videodev_exit(void)
> >  	unregister_chrdev_region(dev, VIDEO_NUM_DEVICES);
> >  }
> >
> > -module_init(videodev_init)
> > +subsys_initcall(videodev_init);
> >  module_exit(videodev_exit)
> >
> >  MODULE_AUTHOR("Alan Cox, Mauro Carvalho Chehab
> <mchehab@xxxxxxxxxxxxx>");
> 
> Shouldn't drivers/media/media-devnode.c then use subsys_initcall() as
> well ?
> 

Yes, it should. Do you want me to send a patch for the same also?

But I have no platform to check whether the Media Controller changes
for g_webcam work on a real platform (i.e. omap3isp), so can you
kindly test the patch I send for the same on your setup?

Regards,
Bhupesh
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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