diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-24 13:29:18 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-24 13:29:18 -0700 |
commit | 0cd5ff591ab6473355d5a6a47f7694def28e451d (patch) | |
tree | aed0ea4fbb724f13208ed76d438518ffc9130a17 /drivers/hwmon/exynos4_tmu.c | |
parent | 3539fc544f39017cf3403b9319fb4d74b5116135 (diff) | |
parent | e30bca12573fbf54e2470723aadc047549d147ce (diff) | |
download | op-kernel-dev-0cd5ff591ab6473355d5a6a47f7694def28e451d.zip op-kernel-dev-0cd5ff591ab6473355d5a6a47f7694def28e451d.tar.gz |
Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull hwmon updates from Guenter Roeck:
"New drivers for DA9052/53 PMIC as well as HIH-6130/HIH-6131 humidity
and temperature sensors.
Convert drivers to use devm_ functions and to use dev_pm_ops. Address
a couple of Coverity errors/warnings as well as compile warnings.
Some functional improvements in applesmc driver."
* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (72 commits)
hwmon: (applesmc) Ignore some temperature registers
hwmon: (applesmc) Allow negative temperature values
hwmon: (s3c-hwmon) Use devm_kzalloc instead of kzalloc
hwmon: (w83781d) Fix compile warning
hwmon: (applesmc) Shorten minimum wait time
hwmon: (exynos4_tmu) Use struct dev_pm_ops for power management
hwmon: (gpio-fan) Use struct dev_pm_ops for power management
hwmon: (abituguru3) Use struct dev_pm_ops for power management
hwmon: (abituguru) Use struct dev_pm_ops for power management
hwmon: (acpi_power_meter) Fix unintentional integer overflow
hwmon: (acpi_power_meter) Cleanup and optimizations
hwmon: Honeywell Humidicon HIH-6130/HIH-6131 humidity and temperature sensor driver
hwmon: (applesmc) Skip sensor mapping
hwmon: (ntc_thermistor) Ensure that data->name string is terminated
hwmon: (w83l785ts) Convert to use devm_ functions
hwmon: (w83l785ts) Simplify code and improve readability
hwmon: (smsc47m192) Convert to use devm_ functions
hwmon: (smsc47m1) Convert to use devm_ functions
hwmon: (smsc47b397) Convert to use devm_ functions
hwmon: (k8temp) Convert to use devm_ functions
...
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 f2359a0..e912059 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); |