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

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

 



hi,

On Tue, Jun 28, 2011 at 08:36:24AM -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;
> 
> Also, I don't see any other patches that reference this value, so why is
> it being set?

$ git grep -e "musb->gadget_driver" drivers/usb/musb/
drivers/usb/musb/musb_gadget.c:	musb->gadget_driver = driver;
drivers/usb/musb/musb_gadget.c:		if (musb->gadget_driver && musb->gadget_driver->resume) {
drivers/usb/musb/musb_gadget.c:			musb->gadget_driver->resume(&musb->g);
drivers/usb/musb/musb_gadget.c:		if (musb->gadget_driver && musb->gadget_driver->suspend) {
drivers/usb/musb/musb_gadget.c:			musb->gadget_driver->suspend(&musb->g);
drivers/usb/musb/musb_gadget.c:	if (musb->gadget_driver && musb->gadget_driver->disconnect) {
drivers/usb/musb/musb_gadget.c:		musb->gadget_driver->disconnect(&musb->g);
drivers/usb/musb/musb_gadget.c:			musb->gadget_driver
drivers/usb/musb/musb_gadget.c:				? musb->gadget_driver->driver.name
drivers/usb/musb/musb_gadget_ep0.c:	if (!musb->gadget_driver)
drivers/usb/musb/musb_gadget_ep0.c:	retval = musb->gadget_driver->setup(&musb->g, ctrlrequest);
drivers/usb/musb/omap2430.c:			if (musb->gadget_driver) {
drivers/usb/musb/omap2430.c:		if (musb->gadget_driver)
drivers/usb/musb/omap2430.c:			if (musb->gadget_driver) {
drivers/usb/musb/tusb6010.c:		if (is_peripheral_enabled(musb) && !musb->gadget_driver) {

I mentioned on the other mail too, it's not to break the driver
completely while we're still converting it.

-- 
balbi

Attachment: signature.asc
Description: Digital signature


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

  Powered by Linux