diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2009-07-21 21:14:16 +0000 |
---|---|---|
committer | Lars-Peter Clausen <lars@metafoo.de> | 2009-07-21 21:14:16 +0000 |
commit | 1c9e660cc711408477f40a73524a230e5bf5832b (patch) | |
tree | f4c88bbe5742238fa4a7a10ca5f98887e8b384e2 /target/linux/s3c24xx/files-2.6.30/drivers/mfd/glamo/glamo-core.c | |
parent | 08c92313b135dc9c60b76b2f2c4eb52e4382c9b9 (diff) | |
download | upstream-1c9e660cc711408477f40a73524a230e5bf5832b.tar.gz upstream-1c9e660cc711408477f40a73524a230e5bf5832b.tar.bz2 upstream-1c9e660cc711408477f40a73524a230e5bf5832b.zip |
glamo: Use dev_pm_ops instead of platform suspend/resume.
SVN-Revision: 16952
Diffstat (limited to 'target/linux/s3c24xx/files-2.6.30/drivers/mfd/glamo/glamo-core.c')
-rw-r--r-- | target/linux/s3c24xx/files-2.6.30/drivers/mfd/glamo/glamo-core.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/target/linux/s3c24xx/files-2.6.30/drivers/mfd/glamo/glamo-core.c b/target/linux/s3c24xx/files-2.6.30/drivers/mfd/glamo/glamo-core.c index 60cfae843f..0c6fc58130 100644 --- a/target/linux/s3c24xx/files-2.6.30/drivers/mfd/glamo/glamo-core.c +++ b/target/linux/s3c24xx/files-2.6.30/drivers/mfd/glamo/glamo-core.c @@ -43,9 +43,7 @@ #include <asm/div64.h> -#ifdef CONFIG_PM #include <linux/pm.h> -#endif #include "glamo-regs.h" #include "glamo-core.h" @@ -1281,37 +1279,42 @@ static int glamo_remove(struct platform_device *pdev) #ifdef CONFIG_PM -static int glamo_suspend(struct platform_device *pdev, pm_message_t state) +static int glamo_suspend(struct device *dev) { - struct glamo_core *glamo = dev_get_drvdata(&pdev->dev); + struct glamo_core *glamo = dev_get_drvdata(dev); glamo->suspending = 1; glamo_power(glamo, GLAMO_POWER_SUSPEND); return 0; } -static int glamo_resume(struct platform_device *pdev) +static int glamo_resume(struct device *dev) { - struct glamo_core *glamo = dev_get_drvdata(&pdev->dev); + struct glamo_core *glamo = dev_get_drvdata(dev); glamo_power(glamo, GLAMO_POWER_ON); glamo->suspending = 0; return 0; } +static struct dev_pm_ops glamo_pm_ops = { + .suspend = glamo_suspend, + .resume = glamo_resume, +}; + +#define GLAMO_PM_OPS (&glamo_pm_ops) + #else -#define glamo_suspend NULL -#define glamo_resume NULL +#define GLAMO_PM_OPS NULL #endif static struct platform_driver glamo_driver = { .probe = glamo_probe, .remove = glamo_remove, - .suspend = glamo_suspend, - .resume = glamo_resume, .driver = { .name = "glamo3362", .owner = THIS_MODULE, + .pm = GLAMO_PM_OPS, }, }; |