summaryrefslogtreecommitdiffstats
path: root/target/linux/s3c24xx/files-2.6.30/drivers/mfd/glamo/glamo-core.c
diff options
context:
space:
mode:
authorlars <lars@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-07-21 21:14:16 +0000
committerlars <lars@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-07-21 21:14:16 +0000
commit3047c0ecc311fb92179046be48414cc570d75d0b (patch)
treedd19566c9bfc8125c09d097aedb7ec48698aff7d /target/linux/s3c24xx/files-2.6.30/drivers/mfd/glamo/glamo-core.c
parentc61e160c9341d9b3c5e084353ee0d6f2d525e617 (diff)
[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.c23
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 60cfae843..0c6fc5813 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,
},
};