diff options
| -rw-r--r-- | drivers/hwmon/exynos4_tmu.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/hwmon/exynos4_tmu.c b/drivers/hwmon/exynos4_tmu.c index f2359a0093bd..e912059140cd 100644 --- a/drivers/hwmon/exynos4_tmu.c +++ b/drivers/hwmon/exynos4_tmu.c | |||
| @@ -475,35 +475,39 @@ static int __devexit exynos4_tmu_remove(struct platform_device *pdev) | |||
| 475 | return 0; | 475 | return 0; |
| 476 | } | 476 | } |
| 477 | 477 | ||
| 478 | #ifdef CONFIG_PM | 478 | #ifdef CONFIG_PM_SLEEP |
| 479 | static int exynos4_tmu_suspend(struct platform_device *pdev, pm_message_t state) | 479 | static int exynos4_tmu_suspend(struct device *dev) |
| 480 | { | 480 | { |
| 481 | exynos4_tmu_control(pdev, false); | 481 | exynos4_tmu_control(to_platform_device(dev), false); |
| 482 | 482 | ||
| 483 | return 0; | 483 | return 0; |
| 484 | } | 484 | } |
| 485 | 485 | ||
| 486 | static int exynos4_tmu_resume(struct platform_device *pdev) | 486 | static int exynos4_tmu_resume(struct device *dev) |
| 487 | { | 487 | { |
| 488 | struct platform_device *pdev = to_platform_device(dev); | ||
| 489 | |||
| 488 | exynos4_tmu_initialize(pdev); | 490 | exynos4_tmu_initialize(pdev); |
| 489 | exynos4_tmu_control(pdev, true); | 491 | exynos4_tmu_control(pdev, true); |
| 490 | 492 | ||
| 491 | return 0; | 493 | return 0; |
| 492 | } | 494 | } |
| 495 | |||
| 496 | static SIMPLE_DEV_PM_OPS(exynos4_tmu_pm, | ||
| 497 | exynos4_tmu_suspend, exynos4_tmu_resume); | ||
| 498 | #define EXYNOS4_TMU_PM &exynos4_tmu_pm | ||
| 493 | #else | 499 | #else |
| 494 | #define exynos4_tmu_suspend NULL | 500 | #define EXYNOS4_TMU_PM NULL |
| 495 | #define exynos4_tmu_resume NULL | ||
| 496 | #endif | 501 | #endif |
| 497 | 502 | ||
| 498 | static struct platform_driver exynos4_tmu_driver = { | 503 | static struct platform_driver exynos4_tmu_driver = { |
| 499 | .driver = { | 504 | .driver = { |
| 500 | .name = "exynos4-tmu", | 505 | .name = "exynos4-tmu", |
| 501 | .owner = THIS_MODULE, | 506 | .owner = THIS_MODULE, |
| 507 | .pm = EXYNOS4_TMU_PM, | ||
| 502 | }, | 508 | }, |
| 503 | .probe = exynos4_tmu_probe, | 509 | .probe = exynos4_tmu_probe, |
| 504 | .remove = __devexit_p(exynos4_tmu_remove), | 510 | .remove = __devexit_p(exynos4_tmu_remove), |
| 505 | .suspend = exynos4_tmu_suspend, | ||
| 506 | .resume = exynos4_tmu_resume, | ||
| 507 | }; | 511 | }; |
| 508 | 512 | ||
| 509 | module_platform_driver(exynos4_tmu_driver); | 513 | module_platform_driver(exynos4_tmu_driver); |
