From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from perceval.ideasonboard.com ([95.142.166.194]:53749 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751758Ab2CLN7i (ORCPT ); Mon, 12 Mar 2012 09:59:38 -0400 From: Laurent Pinchart To: Bhupesh Sharma Cc: linux-media@vger.kernel.org, spear-devel@list.st.com Subject: Re: [PATCH 1/1] V4L/v4l2-dev: Make 'videodev_init' as a subsys initcall Date: Mon, 12 Mar 2012 15:00:02 +0100 Message-ID: <14320325.8aVQ1vTbWk@avalon> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-media-owner@vger.kernel.org List-ID: 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. [snip] > Signed-off-by: Bhupesh Sharma Tested-by: Laurent Pinchart Acked-by: Laurent Pinchart > --- > 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 "); -- Regards, Laurent Pinchart