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 | b5a10d0288bc12df71e3ce1a68a4f1025f9f382c (patch) | |
tree | dd19566c9bfc8125c09d097aedb7ec48698aff7d /target/linux/s3c24xx/files-2.6.30/drivers/mfd/glamo/glamo-core.c | |
parent | 78fae87beb5ba2c0afd3beb7176f735c00ea5f04 (diff) | |
download | master-187ad058-b5a10d0288bc12df71e3ce1a68a4f1025f9f382c.tar.gz master-187ad058-b5a10d0288bc12df71e3ce1a68a4f1025f9f382c.tar.bz2 master-187ad058-b5a10d0288bc12df71e3ce1a68a4f1025f9f382c.zip |
[s3c24xx] glamo: Use dev_pm_ops instead of platform suspend/resume.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16952 3c298f89-4303-0410-b956-a3cf2f4a3e73
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, }, }; |