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 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?

And when is the "conversion" going to be finished?

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