All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Bhupesh SHARMA <bhupesh.sharma@st.com>
Cc: "linux-media@vger.kernel.org" <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	[thread overview]
Message-ID: <2310390.JmOSWKFls9@avalon> (raw)
In-Reply-To: <D5ECB3C7A6F99444980976A8C6D896384FA2BA2212@EAPEX1MAIL1.st.com>

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 <laurent.pinchart@ideasonboard.com>
> > ---
> > 
> >  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@st.com>

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@ideasonboard.com>");
> > 
> > --

-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2012-03-14  1:36 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
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 [this message]
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=2310390.JmOSWKFls9@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=bhupesh.sharma@st.com \
    --cc=linux-media@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.