Re: [PATCH next] usb: musb: fix kernel panic during s2ram

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

 



On Sat, 18 Dec 2010, Ming Lei wrote:

> Hi,
> 
> 2010/12/18 Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>:
> > On Fri, 17 Dec 2010 tom.leiming@xxxxxxxxx wrote:
> >
> >> From: Ming Lei <tom.leiming@xxxxxxxxx>
> >>
> >> This patch fix kernel panic during s2ram, which is caused
> >> by mistaken definition of glue_to_musb.
> >
> >> --- a/drivers/usb/musb/musb_core.h
> >> +++ b/drivers/usb/musb/musb_core.h
> >> @@ -577,6 +577,16 @@ static inline void musb_configure_ep0(struct musb *musb)
> >>  }
> >>  #endif /* CONFIG_BLACKFIN */
> >>
> >> +static inline struct musb *dev_to_musb(struct device *dev)
> >> +{
> >> +#ifdef CONFIG_USB_MUSB_HDRC_HCD
> >> +     /* usbcore insists dev->driver_data is a "struct hcd *" */
> >
> > It does?  Where?
> 
> usb_create_hcd()
>     ......
>     dev_set_drvdata(dev, hcd);
>     ......
> 
> In fact, should be dev->p->driver_data, accurately speaking.

Well, usbcore does not use this value.  It's just the default; drivers 
can change it if they want.  usbcore does not _insist_ on the value.

> Seems it is nothing to do with the patch, dev_to_musb is only moved from
> musb_core.c to musb_core.h, :-)

Therefore this is your chance to fix the comment!  :-)

Alan Stern

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