From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Bhupesh Sharma <bhupesh.sharma@st.com>
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 11:04:51 +0100 [thread overview]
Message-ID: <2051000.HEIejvjnKb@avalon> (raw)
In-Reply-To: <bbe7861cb38c036d3c24df908ffbfc125274ea99.1331543025.git.bhupesh.sharma@st.com>
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@st.com>
> ---
> 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@infradead.org>");
Shouldn't drivers/media/media-devnode.c then use subsys_initcall() as well ?
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2012-03-12 10:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-12 9:09 [PATCH 1/1] V4L/v4l2-dev: Make 'videodev_init' as a subsys initcall Bhupesh Sharma
2012-03-12 10:04 ` Laurent Pinchart [this message]
2012-03-12 10:13 ` Bhupesh SHARMA
2012-03-12 10:24 ` Laurent Pinchart
2012-03-12 10:28 ` Bhupesh SHARMA
2012-03-12 14:00 ` Laurent Pinchart
2012-03-12 14:02 ` [PATCH] media: Initialize the media core with subsys_initcall() Laurent Pinchart
2012-03-13 3:31 ` Bhupesh SHARMA
2012-03-14 1:37 ` Laurent Pinchart
2012-03-14 8:36 ` Sakari Ailus
2012-03-14 8:37 ` [PATCH 1/1] V4L/v4l2-dev: Make 'videodev_init' as a subsys initcall Sakari Ailus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2051000.HEIejvjnKb@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=bhupesh.sharma@st.com \
--cc=linux-media@vger.kernel.org \
--cc=spear-devel@list.st.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox