aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2009-07-17 10:52:05 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-07-19 15:27:06 -0400
commitae1cef6ea155328905cb359ec7c2a47776d2d4d4 (patch)
tree02147aa80476319fb98dc4c462fe5cae917c2bb8 /drivers/usb
parent78af08d90b8f745044b1274430bc4bc6b2b27aca (diff)
usb: convert r8a66597-hcd to dev_pm_ops
Convert the r8a66597-hcd driver to dev_pm_ops. This makes the driver a good PM citizen and removes a warning printout. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/r8a66597-hcd.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c
index e18f74946e68..09895a97c10b 100644
--- a/drivers/usb/host/r8a66597-hcd.c
+++ b/drivers/usb/host/r8a66597-hcd.c
@@ -2305,9 +2305,9 @@ static struct hc_driver r8a66597_hc_driver = {
2305}; 2305};
2306 2306
2307#if defined(CONFIG_PM) 2307#if defined(CONFIG_PM)
2308static int r8a66597_suspend(struct platform_device *pdev, pm_message_t state) 2308static int r8a66597_suspend(struct device *dev)
2309{ 2309{
2310 struct r8a66597 *r8a66597 = dev_get_drvdata(&pdev->dev); 2310 struct r8a66597 *r8a66597 = dev_get_drvdata(dev);
2311 int port; 2311 int port;
2312 2312
2313 dbg("%s", __func__); 2313 dbg("%s", __func__);
@@ -2323,9 +2323,9 @@ static int r8a66597_suspend(struct platform_device *pdev, pm_message_t state)
2323 return 0; 2323 return 0;
2324} 2324}
2325 2325
2326static int r8a66597_resume(struct platform_device *pdev) 2326static int r8a66597_resume(struct device *dev)
2327{ 2327{
2328 struct r8a66597 *r8a66597 = dev_get_drvdata(&pdev->dev); 2328 struct r8a66597 *r8a66597 = dev_get_drvdata(dev);
2329 struct usb_hcd *hcd = r8a66597_to_hcd(r8a66597); 2329 struct usb_hcd *hcd = r8a66597_to_hcd(r8a66597);
2330 2330
2331 dbg("%s", __func__); 2331 dbg("%s", __func__);
@@ -2335,9 +2335,15 @@ static int r8a66597_resume(struct platform_device *pdev)
2335 2335
2336 return 0; 2336 return 0;
2337} 2337}
2338
2339static struct dev_pm_ops r8a66597_dev_pm_ops = {
2340 .suspend = r8a66597_suspend,
2341 .resume = r8a66597_resume,
2342};
2343
2344#define R8A66597_DEV_PM_OPS (&r8a66597_dev_pm_ops)
2338#else /* if defined(CONFIG_PM) */ 2345#else /* if defined(CONFIG_PM) */
2339#define r8a66597_suspend NULL 2346#define R8A66597_DEV_PM_OPS NULL
2340#define r8a66597_resume NULL
2341#endif 2347#endif
2342 2348
2343static int __init_or_module r8a66597_remove(struct platform_device *pdev) 2349static int __init_or_module r8a66597_remove(struct platform_device *pdev)
@@ -2473,11 +2479,10 @@ clean_up:
2473static struct platform_driver r8a66597_driver = { 2479static struct platform_driver r8a66597_driver = {
2474 .probe = r8a66597_probe, 2480 .probe = r8a66597_probe,
2475 .remove = r8a66597_remove, 2481 .remove = r8a66597_remove,
2476 .suspend = r8a66597_suspend,
2477 .resume = r8a66597_resume,
2478 .driver = { 2482 .driver = {
2479 .name = (char *) hcd_name, 2483 .name = (char *) hcd_name,
2480 .owner = THIS_MODULE, 2484 .owner = THIS_MODULE,
2485 .pm = R8A66597_DEV_PM_OPS,
2481 }, 2486 },
2482}; 2487};
2483 2488