@@ -891,7 +891,7 @@ static void stm32_qspi_remove(struct platform_device *pdev)
891891 clk_disable_unprepare (qspi -> clk );
892892}
893893
894- static int __maybe_unused stm32_qspi_runtime_suspend (struct device * dev )
894+ static int stm32_qspi_runtime_suspend (struct device * dev )
895895{
896896 struct stm32_qspi * qspi = dev_get_drvdata (dev );
897897
@@ -900,21 +900,21 @@ static int __maybe_unused stm32_qspi_runtime_suspend(struct device *dev)
900900 return 0 ;
901901}
902902
903- static int __maybe_unused stm32_qspi_runtime_resume (struct device * dev )
903+ static int stm32_qspi_runtime_resume (struct device * dev )
904904{
905905 struct stm32_qspi * qspi = dev_get_drvdata (dev );
906906
907907 return clk_prepare_enable (qspi -> clk );
908908}
909909
910- static int __maybe_unused stm32_qspi_suspend (struct device * dev )
910+ static int stm32_qspi_suspend (struct device * dev )
911911{
912912 pinctrl_pm_select_sleep_state (dev );
913913
914914 return pm_runtime_force_suspend (dev );
915915}
916916
917- static int __maybe_unused stm32_qspi_resume (struct device * dev )
917+ static int stm32_qspi_resume (struct device * dev )
918918{
919919 struct stm32_qspi * qspi = dev_get_drvdata (dev );
920920 int ret ;
@@ -938,9 +938,8 @@ static int __maybe_unused stm32_qspi_resume(struct device *dev)
938938}
939939
940940static const struct dev_pm_ops stm32_qspi_pm_ops = {
941- SET_RUNTIME_PM_OPS (stm32_qspi_runtime_suspend ,
942- stm32_qspi_runtime_resume , NULL )
943- SET_SYSTEM_SLEEP_PM_OPS (stm32_qspi_suspend , stm32_qspi_resume )
941+ RUNTIME_PM_OPS (stm32_qspi_runtime_suspend , stm32_qspi_runtime_resume , NULL )
942+ SYSTEM_SLEEP_PM_OPS (stm32_qspi_suspend , stm32_qspi_resume )
944943};
945944
946945static const struct of_device_id stm32_qspi_match [] = {
@@ -955,7 +954,7 @@ static struct platform_driver stm32_qspi_driver = {
955954 .driver = {
956955 .name = "stm32-qspi" ,
957956 .of_match_table = stm32_qspi_match ,
958- .pm = & stm32_qspi_pm_ops ,
957+ .pm = pm_ptr ( & stm32_qspi_pm_ops ) ,
959958 },
960959};
961960module_platform_driver (stm32_qspi_driver );
0 commit comments