diff options
author | Chris Johnson <cwj@nvidia.com> | 2011-12-02 11:51:25 -0800 |
---|---|---|
committer | Varun Wadekar <vwadekar@nvidia.com> | 2011-12-08 18:08:38 +0530 |
commit | 93dc60921bc85edbc2cb523220a759a9d2be1b6a (patch) | |
tree | f58e90839fdc3918f122df80732f22ea1b2e0072 /drivers/crypto | |
parent | 33c9bbe38a93f618c543754b06d05f976b88c0f2 (diff) |
crypto: tegra-se: fix suspend routine hookup
In platform_pm_suspend, if there's a dev->driver->pm struct,
it expects the suspend routine to be filled in there.
With a pm struct, it won't use the platform_legacy_suspend
path, which is how tegra_se_suspend had been hooked up. This
change just moves suspend/resume into the pm ops struct.
Bug 883391
Change-Id: Iee8245676ba104d2e4cc0f2f2ffe406674cb1d5b
Signed-off-by: Chris Johnson <cwj@nvidia.com>
Reviewed-on: http://git-master/r/67989
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
Diffstat (limited to 'drivers/crypto')
-rw-r--r-- | drivers/crypto/tegra-se.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/crypto/tegra-se.c b/drivers/crypto/tegra-se.c index 4d943d0248ef..fea3f456a0b0 100644 --- a/drivers/crypto/tegra-se.c +++ b/drivers/crypto/tegra-se.c @@ -2016,10 +2016,11 @@ static int __devexit tegra_se_remove(struct platform_device *pdev) } #if defined(CONFIG_PM) -static int tegra_se_resume(struct platform_device *pdev) +static int tegra_se_resume(struct device *dev) { return 0; } + static int tegra_se_generate_rng_key(struct tegra_se_dev *se_dev) { int ret = 0; @@ -2272,8 +2273,9 @@ static int tegra_se_save_SRK(struct tegra_se_dev *se_dev) return ret; } -static int tegra_se_suspend(struct platform_device *pdev, pm_message_t state) +static int tegra_se_suspend(struct device *dev) { + struct platform_device *pdev = to_platform_device(dev); struct tegra_se_dev *se_dev = platform_get_drvdata(pdev); int err = 0, i; unsigned char *dt_buf = NULL; @@ -2387,20 +2389,19 @@ static int tegra_se_runtime_resume(struct device *dev) static const struct dev_pm_ops tegra_se_dev_pm_ops = { .runtime_suspend = tegra_se_runtime_suspend, .runtime_resume = tegra_se_runtime_resume, +#if defined(CONFIG_PM) + .suspend = tegra_se_suspend, + .resume = tegra_se_resume, +#endif }; #endif static struct platform_driver tegra_se_driver = { .probe = tegra_se_probe, .remove = __devexit_p(tegra_se_remove), -#if defined(CONFIG_PM) - .suspend = tegra_se_suspend, - .resume = tegra_se_resume, -#endif .driver = { .name = "tegra-se", .owner = THIS_MODULE, - #if defined(CONFIG_PM_RUNTIME) .pm = &tegra_se_dev_pm_ops, #endif |