diff options
author | Ming Lei <tom.leiming@gmail.com> | 2010-12-21 21:16:11 +0800 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-02-01 10:41:29 +0200 |
commit | 456bb1697ec08c034449c81e03094fe26bedb9e9 (patch) | |
tree | 0a227e117c95e21a6ca528bcfefa58281af7bffe /drivers/usb | |
parent | ebf53826e105f488f4f628703a108e98940d1dc5 (diff) |
usb: musb: fix kernel panic during s2ram(v2)
This patch fixes kernel panic during s2ram, which is caused
by the below:
- musb is not put into drv data of musb platform device if
CONFIG_USB_MUSB_HDRC_HCD is defined
- glue layer driver always get musb instance via platform_get_drvdata.
The patch fixes the issue by always puting musb into drv data
of musb platform device, which is doable even the platform device
is a host controller device.
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Sergei Shtylyov <sshtylyov@mvista.com>
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/musb/musb_core.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 07cf394e491b..12b515b3b69e 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -128,12 +128,7 @@ MODULE_ALIAS("platform:" MUSB_DRIVER_NAME); 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 *" */ - return hcd_to_musb(dev_get_drvdata(dev)); -#else return dev_get_drvdata(dev); -#endif } /*-------------------------------------------------------------------------*/ @@ -1876,10 +1871,9 @@ allocate_instance(struct device *dev, musb = kzalloc(sizeof *musb, GFP_KERNEL); if (!musb) return NULL; - dev_set_drvdata(dev, musb); #endif - + dev_set_drvdata(dev, musb); musb->mregs = mbase; musb->ctrl_base = mbase; musb->nIrq = -ENODEV; |