diff options
author | Mark A. Greer <mgreer@animalcreek.com> | 2012-12-21 12:04:03 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2013-01-05 05:43:56 -0500 |
commit | 3b3f440023b3809c8eabec681768a4bcee15f2b4 (patch) | |
tree | 73b94756ccb7a1259aaf8ce105ea227c1dd2b8aa /drivers/crypto | |
parent | b359f034c8bf6c6ae4785c1172786ce73eccf9f2 (diff) |
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: Mark A. Greer <mgreer@animalcreek.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r-- | drivers/crypto/omap-sham.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c index 777eb9fdd096..9c3b096e15e8 100644 --- a/drivers/crypto/omap-sham.c +++ b/drivers/crypto/omap-sham.c | |||
@@ -1269,12 +1269,31 @@ static int __devexit omap_sham_remove(struct platform_device *pdev) | |||
1269 | return 0; | 1269 | return 0; |
1270 | } | 1270 | } |
1271 | 1271 | ||
1272 | #ifdef CONFIG_PM_SLEEP | ||
1273 | static int omap_sham_suspend(struct device *dev) | ||
1274 | { | ||
1275 | pm_runtime_put_sync(dev); | ||
1276 | return 0; | ||
1277 | } | ||
1278 | |||
1279 | static int omap_sham_resume(struct device *dev) | ||
1280 | { | ||
1281 | pm_runtime_get_sync(dev); | ||
1282 | return 0; | ||
1283 | } | ||
1284 | #endif | ||
1285 | |||
1286 | static const struct dev_pm_ops omap_sham_pm_ops = { | ||
1287 | SET_SYSTEM_SLEEP_PM_OPS(omap_sham_suspend, omap_sham_resume) | ||
1288 | }; | ||
1289 | |||
1272 | static struct platform_driver omap_sham_driver = { | 1290 | static struct platform_driver omap_sham_driver = { |
1273 | .probe = omap_sham_probe, | 1291 | .probe = omap_sham_probe, |
1274 | .remove = omap_sham_remove, | 1292 | .remove = omap_sham_remove, |
1275 | .driver = { | 1293 | .driver = { |
1276 | .name = "omap-sham", | 1294 | .name = "omap-sham", |
1277 | .owner = THIS_MODULE, | 1295 | .owner = THIS_MODULE, |
1296 | .pm = &omap_sham_pm_ops, | ||
1278 | }, | 1297 | }, |
1279 | }; | 1298 | }; |
1280 | 1299 | ||