Commit b52c8c72 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Herbert Xu

crypto: caam - fix PM operations definition

The newly added PM operations use the deprecated SIMPLE_DEV_PM_OPS() macro,
causing a warning in some configurations:

drivers/crypto/caam/ctrl.c:828:12: error: 'caam_ctrl_resume' defined but not used [-Werror=unused-function]
  828 | static int caam_ctrl_resume(struct device *dev)
      |            ^~~~~~~~~~~~~~~~
drivers/crypto/caam/ctrl.c:818:12: error: 'caam_ctrl_suspend' defined but not used [-Werror=unused-function]
  818 | static int caam_ctrl_suspend(struct device *dev)
      |            ^~~~~~~~~~~~~~~~~
drivers/crypto/caam/jr.c:732:12: error: 'caam_jr_resume' defined but not used [-Werror=unused-function]
  732 | static int caam_jr_resume(struct device *dev)
      |            ^~~~~~~~~~~~~~
drivers/crypto/caam/jr.c:687:12: error: 'caam_jr_suspend' defined but not used [-Werror=unused-function]
  687 | static int caam_jr_suspend(struct device *dev)
      |            ^~~~~~~~~~~~~~~

Use the normal DEFINE_SIMPLE_DEV_PM_OPS() variant now, and use pm_ptr() to
completely eliminate the structure in configs without CONFIG_PM.

Fixes: 322d7475 ("crypto: caam - add power management support")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Reviewed-by: default avatarMeenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 91cb1e14
...@@ -841,7 +841,7 @@ static int caam_ctrl_resume(struct device *dev) ...@@ -841,7 +841,7 @@ static int caam_ctrl_resume(struct device *dev)
return ret; return ret;
} }
static SIMPLE_DEV_PM_OPS(caam_ctrl_pm_ops, caam_ctrl_suspend, caam_ctrl_resume); static DEFINE_SIMPLE_DEV_PM_OPS(caam_ctrl_pm_ops, caam_ctrl_suspend, caam_ctrl_resume);
/* Probe routine for CAAM top (controller) level */ /* Probe routine for CAAM top (controller) level */
static int caam_probe(struct platform_device *pdev) static int caam_probe(struct platform_device *pdev)
...@@ -1138,7 +1138,7 @@ static struct platform_driver caam_driver = { ...@@ -1138,7 +1138,7 @@ static struct platform_driver caam_driver = {
.driver = { .driver = {
.name = "caam", .name = "caam",
.of_match_table = caam_match, .of_match_table = caam_match,
.pm = &caam_ctrl_pm_ops, .pm = pm_ptr(&caam_ctrl_pm_ops),
}, },
.probe = caam_probe, .probe = caam_probe,
}; };
......
...@@ -794,7 +794,7 @@ static int caam_jr_resume(struct device *dev) ...@@ -794,7 +794,7 @@ static int caam_jr_resume(struct device *dev)
return 0; return 0;
} }
static SIMPLE_DEV_PM_OPS(caam_jr_pm_ops, caam_jr_suspend, caam_jr_resume); static DEFINE_SIMPLE_DEV_PM_OPS(caam_jr_pm_ops, caam_jr_suspend, caam_jr_resume);
static const struct of_device_id caam_jr_match[] = { static const struct of_device_id caam_jr_match[] = {
{ {
...@@ -811,7 +811,7 @@ static struct platform_driver caam_jr_driver = { ...@@ -811,7 +811,7 @@ static struct platform_driver caam_jr_driver = {
.driver = { .driver = {
.name = "caam_jr", .name = "caam_jr",
.of_match_table = caam_jr_match, .of_match_table = caam_jr_match,
.pm = &caam_jr_pm_ops, .pm = pm_ptr(&caam_jr_pm_ops),
}, },
.probe = caam_jr_probe, .probe = caam_jr_probe,
.remove = caam_jr_remove, .remove = caam_jr_remove,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment