Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 316030
b: refs/heads/master
c: 08cd675
h: refs/heads/master
v: v3
  • Loading branch information
Rafael J. Wysocki authored and Guenter Roeck committed Jul 22, 2012
1 parent 9ff4890 commit 091e90e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6d20a6c060c41a7a9c8f5bd4b9d44b8f13b78694
refs/heads/master: 08cd6753d96aebcceebe10800fede1e4830e2a48
20 changes: 12 additions & 8 deletions trunk/drivers/hwmon/exynos4_tmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,35 +475,39 @@ static int __devexit exynos4_tmu_remove(struct platform_device *pdev)
return 0;
}

#ifdef CONFIG_PM
static int exynos4_tmu_suspend(struct platform_device *pdev, pm_message_t state)
#ifdef CONFIG_PM_SLEEP
static int exynos4_tmu_suspend(struct device *dev)
{
exynos4_tmu_control(pdev, false);
exynos4_tmu_control(to_platform_device(dev), false);

return 0;
}

static int exynos4_tmu_resume(struct platform_device *pdev)
static int exynos4_tmu_resume(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);

exynos4_tmu_initialize(pdev);
exynos4_tmu_control(pdev, true);

return 0;
}

static SIMPLE_DEV_PM_OPS(exynos4_tmu_pm,
exynos4_tmu_suspend, exynos4_tmu_resume);
#define EXYNOS4_TMU_PM &exynos4_tmu_pm
#else
#define exynos4_tmu_suspend NULL
#define exynos4_tmu_resume NULL
#define EXYNOS4_TMU_PM NULL
#endif

static struct platform_driver exynos4_tmu_driver = {
.driver = {
.name = "exynos4-tmu",
.owner = THIS_MODULE,
.pm = EXYNOS4_TMU_PM,
},
.probe = exynos4_tmu_probe,
.remove = __devexit_p(exynos4_tmu_remove),
.suspend = exynos4_tmu_suspend,
.resume = exynos4_tmu_resume,
};

module_platform_driver(exynos4_tmu_driver);
Expand Down

0 comments on commit 091e90e

Please sign in to comment.