diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-08-23 05:04:07 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-08-23 05:04:07 -0400 |
commit | c3144fc46f987413df10e83659f0bf1aad76f79e (patch) | |
tree | a09f3c13c32664a617d3981ae111436c3127ccc3 /drivers/usb | |
parent | 4f896ffca2b72f4b719746e7fbb0b623252e6ac9 (diff) | |
parent | cc58f597afc63a57bb55ed97c2a72f7405320c93 (diff) |
Merge branches 'sh/hwblk' and 'sh/pm-runtime'
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/musb/musb_core.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index c7c1ca0494cd..1d26beddf2ca 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
@@ -2167,8 +2167,9 @@ static int __devexit musb_remove(struct platform_device *pdev) | |||
2167 | 2167 | ||
2168 | #ifdef CONFIG_PM | 2168 | #ifdef CONFIG_PM |
2169 | 2169 | ||
2170 | static int musb_suspend(struct platform_device *pdev, pm_message_t message) | 2170 | static int musb_suspend(struct device *dev) |
2171 | { | 2171 | { |
2172 | struct platform_device *pdev = to_platform_device(dev); | ||
2172 | unsigned long flags; | 2173 | unsigned long flags; |
2173 | struct musb *musb = dev_to_musb(&pdev->dev); | 2174 | struct musb *musb = dev_to_musb(&pdev->dev); |
2174 | 2175 | ||
@@ -2195,8 +2196,9 @@ static int musb_suspend(struct platform_device *pdev, pm_message_t message) | |||
2195 | return 0; | 2196 | return 0; |
2196 | } | 2197 | } |
2197 | 2198 | ||
2198 | static int musb_resume_early(struct platform_device *pdev) | 2199 | static int musb_resume_noirq(struct device *dev) |
2199 | { | 2200 | { |
2201 | struct platform_device *pdev = to_platform_device(dev); | ||
2200 | struct musb *musb = dev_to_musb(&pdev->dev); | 2202 | struct musb *musb = dev_to_musb(&pdev->dev); |
2201 | 2203 | ||
2202 | if (!musb->clock) | 2204 | if (!musb->clock) |
@@ -2214,9 +2216,14 @@ static int musb_resume_early(struct platform_device *pdev) | |||
2214 | return 0; | 2216 | return 0; |
2215 | } | 2217 | } |
2216 | 2218 | ||
2219 | static struct dev_pm_ops musb_dev_pm_ops = { | ||
2220 | .suspend = musb_suspend, | ||
2221 | .resume_noirq = musb_resume_noirq, | ||
2222 | }; | ||
2223 | |||
2224 | #define MUSB_DEV_PM_OPS (&musb_dev_pm_ops) | ||
2217 | #else | 2225 | #else |
2218 | #define musb_suspend NULL | 2226 | #define MUSB_DEV_PM_OPS NULL |
2219 | #define musb_resume_early NULL | ||
2220 | #endif | 2227 | #endif |
2221 | 2228 | ||
2222 | static struct platform_driver musb_driver = { | 2229 | static struct platform_driver musb_driver = { |
@@ -2224,11 +2231,10 @@ static struct platform_driver musb_driver = { | |||
2224 | .name = (char *)musb_driver_name, | 2231 | .name = (char *)musb_driver_name, |
2225 | .bus = &platform_bus_type, | 2232 | .bus = &platform_bus_type, |
2226 | .owner = THIS_MODULE, | 2233 | .owner = THIS_MODULE, |
2234 | .pm = MUSB_DEV_PM_OPS, | ||
2227 | }, | 2235 | }, |
2228 | .remove = __devexit_p(musb_remove), | 2236 | .remove = __devexit_p(musb_remove), |
2229 | .shutdown = musb_shutdown, | 2237 | .shutdown = musb_shutdown, |
2230 | .suspend = musb_suspend, | ||
2231 | .resume_early = musb_resume_early, | ||
2232 | }; | 2238 | }; |
2233 | 2239 | ||
2234 | /*-------------------------------------------------------------------------*/ | 2240 | /*-------------------------------------------------------------------------*/ |