From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from perceval.ideasonboard.com ([95.142.166.194]:33449 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760475Ab2CNBgy (ORCPT ); Tue, 13 Mar 2012 21:36:54 -0400 From: Laurent Pinchart To: Bhupesh SHARMA Cc: "linux-media@vger.kernel.org" Subject: Re: [PATCH] media: Initialize the media core with subsys_initcall() Date: Wed, 14 Mar 2012 02:37:19 +0100 Message-ID: <2310390.JmOSWKFls9@avalon> In-Reply-To: References: <1331560967-32396-1-git-send-email-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-media-owner@vger.kernel.org List-ID: 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@ideasonboard.com] > > Sent: Monday, March 12, 2012 7:33 PM > > To: linux-media@vger.kernel.org > > 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 > > --- > > > > 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 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 "); > > > > -- -- Regards, Laurent Pinchart