Hi Bhupesh, On Tuesday 13 March 2012 11:31:31 Bhupesh SHARMA wrote: > Hi Laurent, > > Thanks for the patch. > > > -----Original Message----- > > From: Laurent Pinchart [mailto:laurent.pinchart@xxxxxxxxxxxxxxxx] > > Sent: Monday, March 12, 2012 7:33 PM > > To: linux-media@xxxxxxxxxxxxxxx > > Cc: Bhupesh SHARMA > > Subject: [PATCH] media: Initialize the media core with > > subsys_initcall() > > > > Media-related drivers living outside drivers/media/ (such as the UVC > > gadget driver in drivers/usb/gadget/) rely on the media core being > > initialized before they're probed. As drivers/usb/ is linked before > > drivers/media/, this is currently not the case and will lead to crashes > > if the drivers are not compiled as modules. > > > > Register media_devnode_init() as a subsys_initcall() instead of > > module_init() to fix this. > > > > Signed-off-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx> > > --- > > > > drivers/media/media-devnode.c | 2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > > > > Bhupesh, do you plan to send a pull request with your "V4L/v4l2-dev: > > Make > > 'videodev_init' as a subsys initcall" patch, or would you like me to > > take it > > in my tree ? I'd like both patches to go in at the same time, with this > > one > > coming first to avoid any risk of bisection issue. > > I would prefer that you take my patch also in your tree and have > a single pull request for both the patches as they solve the same > issue and hence must be pulled at the same time. OK. I've applied your patch to my tree, I'll send a pull request tomorrow. > For your patch: > Acked-By: Bhupesh Sharma <bhupesh.sharma@xxxxxx> Thanks. > > diff --git a/drivers/media/media-devnode.c b/drivers/media/media- > > devnode.c > > index 7b42ace..421cf73 100644 > > --- a/drivers/media/media-devnode.c > > +++ b/drivers/media/media-devnode.c > > @@ -312,7 +312,7 @@ static void __exit media_devnode_exit(void) > > > > unregister_chrdev_region(media_dev_t, MEDIA_NUM_DEVICES); > > > > } > > > > -module_init(media_devnode_init) > > +subsys_initcall(media_devnode_init); > > > > module_exit(media_devnode_exit) > > > > MODULE_AUTHOR("Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>"); > > > > -- -- Regards, Laurent Pinchart -- 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