@@ -649,7 +649,7 @@ static const struct of_device_id sh_pfc_of_table[] = {
649
649
};
650
650
#endif
651
651
652
- #if defined(CONFIG_PM_SLEEP ) && defined( CONFIG_ARM_PSCI_FW )
652
+ #if defined(CONFIG_ARM_PSCI_FW )
653
653
static void sh_pfc_nop_reg (struct sh_pfc * pfc , u32 reg , unsigned int idx )
654
654
{
655
655
}
@@ -732,15 +732,13 @@ static int sh_pfc_resume_noirq(struct device *dev)
732
732
sh_pfc_walk_regs (pfc , sh_pfc_restore_reg );
733
733
return 0 ;
734
734
}
735
-
736
- static const struct dev_pm_ops sh_pfc_pm = {
737
- SET_NOIRQ_SYSTEM_SLEEP_PM_OPS (sh_pfc_suspend_noirq , sh_pfc_resume_noirq )
738
- };
739
- #define DEV_PM_OPS &sh_pfc_pm
740
735
#else
741
736
static int sh_pfc_suspend_init (struct sh_pfc * pfc ) { return 0 ; }
742
- #define DEV_PM_OPS NULL
743
- #endif /* CONFIG_PM_SLEEP && CONFIG_ARM_PSCI_FW */
737
+ static int sh_pfc_suspend_noirq (struct device * dev ) { return 0 ; }
738
+ static int sh_pfc_resume_noirq (struct device * dev ) { return 0 ; }
739
+ #endif /* CONFIG_ARM_PSCI_FW */
740
+
741
+ static DEFINE_NOIRQ_DEV_PM_OPS (sh_pfc_pm , sh_pfc_suspend_noirq , sh_pfc_resume_noirq ) ;
744
742
745
743
#ifdef DEBUG
746
744
#define SH_PFC_MAX_REGS 300
@@ -1418,7 +1416,7 @@ static struct platform_driver sh_pfc_driver = {
1418
1416
.driver = {
1419
1417
.name = DRV_NAME ,
1420
1418
.of_match_table = of_match_ptr (sh_pfc_of_table ),
1421
- .pm = DEV_PM_OPS ,
1419
+ .pm = pm_sleep_ptr ( & sh_pfc_pm ) ,
1422
1420
},
1423
1421
};
1424
1422
0 commit comments