diff options
author | NeilBrown <neilb@suse.de> | 2012-08-01 20:40:02 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-08-01 20:40:02 +1000 |
commit | bb181e2e48f8c85db08c9cb015cbba9618dbf05c (patch) | |
tree | 191bc24dd97bcb174535cc217af082f16da3b43d /drivers/hwmon/exynos4_tmu.c | |
parent | d57368afe63b3b7b45ce6c2b8c5276417935be2f (diff) | |
parent | c039c332f23e794deb6d6f37b9f07ff3b27fb2cf (diff) |
Merge commit 'c039c332f23e794deb6d6f37b9f07ff3b27fb2cf' into md
Pull in pre-requisites for adding raid10 support to dm-raid.
Diffstat (limited to 'drivers/hwmon/exynos4_tmu.c')
-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 f2359a0093b..e912059140c 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) 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); |