summaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorManuel Lauss <manuel.lauss@googlemail.com>2011-10-22 13:34:39 +0200
committerBen Dooks <ben-linux@fluff.org>2011-10-29 11:14:28 +0100
commit46f344e2a0844d9b068bffa38cb48b52f4bd2d4a (patch)
tree38d12267d55d02ae9608fe3cb1e4d878d461d1b2 /drivers/i2c
parent84785f120f4d64c5fa8cf4bab1cf07c2507d434f (diff)
downloadop-kernel-dev-46f344e2a0844d9b068bffa38cb48b52f4bd2d4a.zip
op-kernel-dev-46f344e2a0844d9b068bffa38cb48b52f4bd2d4a.tar.gz
i2c-au1550: dev_pm_ops conversion
use newer dev_pm_ops for PM Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-au1550.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/drivers/i2c/busses/i2c-au1550.c b/drivers/i2c/busses/i2c-au1550.c
index 4f5150c..4f757a2 100644
--- a/drivers/i2c/busses/i2c-au1550.c
+++ b/drivers/i2c/busses/i2c-au1550.c
@@ -387,39 +387,43 @@ static int __devexit i2c_au1550_remove(struct platform_device *pdev)
}
#ifdef CONFIG_PM
-static int
-i2c_au1550_suspend(struct platform_device *pdev, pm_message_t state)
+static int i2c_au1550_suspend(struct device *dev)
{
- struct i2c_au1550_data *priv = platform_get_drvdata(pdev);
+ struct i2c_au1550_data *priv = dev_get_drvdata(dev);
i2c_au1550_disable(priv);
return 0;
}
-static int
-i2c_au1550_resume(struct platform_device *pdev)
+static int i2c_au1550_resume(struct device *dev)
{
- struct i2c_au1550_data *priv = platform_get_drvdata(pdev);
+ struct i2c_au1550_data *priv = dev_get_drvdata(dev);
i2c_au1550_setup(priv);
return 0;
}
+
+static const struct dev_pm_ops i2c_au1550_pmops = {
+ .suspend = i2c_au1550_suspend,
+ .resume = i2c_au1550_resume,
+};
+
+#define AU1XPSC_SMBUS_PMOPS (&i2c_au1550_pmops)
+
#else
-#define i2c_au1550_suspend NULL
-#define i2c_au1550_resume NULL
+#define AU1XPSC_SMBUS_PMOPS NULL
#endif
static struct platform_driver au1xpsc_smbus_driver = {
.driver = {
.name = "au1xpsc_smbus",
.owner = THIS_MODULE,
+ .pm = AU1XPSC_SMBUS_PMOPS,
},
.probe = i2c_au1550_probe,
.remove = __devexit_p(i2c_au1550_remove),
- .suspend = i2c_au1550_suspend,
- .resume = i2c_au1550_resume,
};
static int __init i2c_au1550_init(void)
OpenPOWER on IntegriCloud