@@ -985,7 +985,7 @@ static void stm32_ospi_remove(struct platform_device *pdev)
985985 pm_runtime_force_suspend (ospi -> dev );
986986}
987987
988- static int __maybe_unused stm32_ospi_suspend (struct device * dev )
988+ static int stm32_ospi_suspend (struct device * dev )
989989{
990990 struct stm32_ospi * ospi = dev_get_drvdata (dev );
991991
@@ -996,7 +996,7 @@ static int __maybe_unused stm32_ospi_suspend(struct device *dev)
996996 return pm_runtime_force_suspend (ospi -> dev );
997997}
998998
999- static int __maybe_unused stm32_ospi_resume (struct device * dev )
999+ static int stm32_ospi_resume (struct device * dev )
10001000{
10011001 struct stm32_ospi * ospi = dev_get_drvdata (dev );
10021002 void __iomem * regs_base = ospi -> regs_base ;
@@ -1025,7 +1025,7 @@ static int __maybe_unused stm32_ospi_resume(struct device *dev)
10251025 return 0 ;
10261026}
10271027
1028- static int __maybe_unused stm32_ospi_runtime_suspend (struct device * dev )
1028+ static int stm32_ospi_runtime_suspend (struct device * dev )
10291029{
10301030 struct stm32_ospi * ospi = dev_get_drvdata (dev );
10311031
@@ -1034,17 +1034,16 @@ static int __maybe_unused stm32_ospi_runtime_suspend(struct device *dev)
10341034 return 0 ;
10351035}
10361036
1037- static int __maybe_unused stm32_ospi_runtime_resume (struct device * dev )
1037+ static int stm32_ospi_runtime_resume (struct device * dev )
10381038{
10391039 struct stm32_ospi * ospi = dev_get_drvdata (dev );
10401040
10411041 return clk_prepare_enable (ospi -> clk );
10421042}
10431043
10441044static const struct dev_pm_ops stm32_ospi_pm_ops = {
1045- SET_SYSTEM_SLEEP_PM_OPS (stm32_ospi_suspend , stm32_ospi_resume )
1046- SET_RUNTIME_PM_OPS (stm32_ospi_runtime_suspend ,
1047- stm32_ospi_runtime_resume , NULL )
1045+ SYSTEM_SLEEP_PM_OPS (stm32_ospi_suspend , stm32_ospi_resume )
1046+ RUNTIME_PM_OPS (stm32_ospi_runtime_suspend , stm32_ospi_runtime_resume , NULL )
10481047};
10491048
10501049static const struct of_device_id stm32_ospi_of_match [] = {
@@ -1058,7 +1057,7 @@ static struct platform_driver stm32_ospi_driver = {
10581057 .remove = stm32_ospi_remove ,
10591058 .driver = {
10601059 .name = "stm32-ospi" ,
1061- .pm = & stm32_ospi_pm_ops ,
1060+ .pm = pm_ptr ( & stm32_ospi_pm_ops ) ,
10621061 .of_match_table = stm32_ospi_of_match ,
10631062 },
10641063};
0 commit comments