提交 3b3f4400 编写于 作者: M Mark A. Greer 提交者: Herbert Xu

crypto: omap-sham - Add suspend/resume support

Add suspend/resume support to the OMAP SHAM driver.

CC: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
Signed-off-by: NMark A. Greer <mgreer@animalcreek.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 b359f034
...@@ -1269,12 +1269,31 @@ static int __devexit omap_sham_remove(struct platform_device *pdev) ...@@ -1269,12 +1269,31 @@ static int __devexit omap_sham_remove(struct platform_device *pdev)
return 0; return 0;
} }
#ifdef CONFIG_PM_SLEEP
static int omap_sham_suspend(struct device *dev)
{
pm_runtime_put_sync(dev);
return 0;
}
static int omap_sham_resume(struct device *dev)
{
pm_runtime_get_sync(dev);
return 0;
}
#endif
static const struct dev_pm_ops omap_sham_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(omap_sham_suspend, omap_sham_resume)
};
static struct platform_driver omap_sham_driver = { static struct platform_driver omap_sham_driver = {
.probe = omap_sham_probe, .probe = omap_sham_probe,
.remove = omap_sham_remove, .remove = omap_sham_remove,
.driver = { .driver = {
.name = "omap-sham", .name = "omap-sham",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.pm = &omap_sham_pm_ops,
}, },
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册