Skip to content

Commit

Permalink
crypto: omap-sham - Add suspend/resume support
Browse files Browse the repository at this point in the history
Add suspend/resume support to the OMAP SHAM driver.

CC: Dmitry Kasatkin <[email protected]>
Signed-off-by: Mark A. Greer <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
mgreeraz authored and herbertx committed Jan 5, 2013
1 parent b359f03 commit 3b3f440
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions drivers/crypto/omap-sham.c
Original file line number Diff line number Diff line change
Expand Up @@ -1269,12 +1269,31 @@ static int __devexit omap_sham_remove(struct platform_device *pdev)
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 = {
.probe = omap_sham_probe,
.remove = omap_sham_remove,
.driver = {
.name = "omap-sham",
.owner = THIS_MODULE,
.pm = &omap_sham_pm_ops,
},
};

Expand Down

0 comments on commit 3b3f440

Please sign in to comment.