Re: [PATCH 40/41] usb: musb: hold a driver pointer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 28, 2011 at 08:23:34PM +0300, Felipe Balbi wrote:
> Hi,
> 
> On Tue, Jun 28, 2011 at 08:35:47AM -0700, Greg KH wrote:
> > On Tue, Jun 28, 2011 at 04:34:25PM +0300, Felipe Balbi wrote:
> > > UDC controllers still need to call gadget
> > > driver's methods. For now, let's continue
> > > holding a gadget driver pointer on musb's
> > > structure until we finish the conversion
> > > to the udc class.
> > > 
> > > Signed-off-by: Felipe Balbi <balbi@xxxxxx>
> > > ---
> > >  drivers/usb/musb/musb_gadget.c |    1 +
> > >  1 files changed, 1 insertions(+), 0 deletions(-)
> > > 
> > > diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
> > > index 3a0c465..8b62654 100644
> > > --- a/drivers/usb/musb/musb_gadget.c
> > > +++ b/drivers/usb/musb/musb_gadget.c
> > > @@ -1881,6 +1881,7 @@ static int musb_gadget_start(struct usb_gadget *g,
> > >  	dev_dbg(musb->controller, "registering driver %s\n", driver->function);
> > >  
> > >  	musb->softconnect = 0;
> > > +	musb->gadget_driver = driver;
> > 
> > How can you "hold" a pointer safely without incrementing its reference
> > count?
> 
> done by udc-core. This is just not to break the driver completely while
> we're still converting to the new API.

But as this is patch 40/41, shouldn't that be done before this one in
the series, otherwise things are broken at patch 39?

> > And when is the "conversion" going to be finished?
> 
> Next merge window, it's mentioned in the GIT PULL mail.

Ah, ok, that's for 3.2.0, right?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux