@@ -930,7 +930,7 @@ static int ina3221_remove(struct i2c_client *client)
930
930
return 0 ;
931
931
}
932
932
933
- static int __maybe_unused ina3221_suspend (struct device * dev )
933
+ static int ina3221_suspend (struct device * dev )
934
934
{
935
935
struct ina3221_data * ina = dev_get_drvdata (dev );
936
936
int ret ;
@@ -953,7 +953,7 @@ static int __maybe_unused ina3221_suspend(struct device *dev)
953
953
return 0 ;
954
954
}
955
955
956
- static int __maybe_unused ina3221_resume (struct device * dev )
956
+ static int ina3221_resume (struct device * dev )
957
957
{
958
958
struct ina3221_data * ina = dev_get_drvdata (dev );
959
959
int ret ;
@@ -996,11 +996,8 @@ static int __maybe_unused ina3221_resume(struct device *dev)
996
996
return 0 ;
997
997
}
998
998
999
- static const struct dev_pm_ops ina3221_pm = {
1000
- SET_SYSTEM_SLEEP_PM_OPS (pm_runtime_force_suspend ,
1001
- pm_runtime_force_resume )
1002
- SET_RUNTIME_PM_OPS (ina3221_suspend , ina3221_resume , NULL )
1003
- };
999
+ static DEFINE_RUNTIME_DEV_PM_OPS (ina3221_pm , ina3221_suspend , ina3221_resume ,
1000
+ NULL) ;
1004
1001
1005
1002
static const struct of_device_id ina3221_of_match_table [] = {
1006
1003
{ .compatible = "ti,ina3221" , },
@@ -1020,7 +1017,7 @@ static struct i2c_driver ina3221_i2c_driver = {
1020
1017
.driver = {
1021
1018
.name = INA3221_DRIVER_NAME ,
1022
1019
.of_match_table = ina3221_of_match_table ,
1023
- .pm = & ina3221_pm ,
1020
+ .pm = pm_ptr ( & ina3221_pm ) ,
1024
1021
},
1025
1022
.id_table = ina3221_ids ,
1026
1023
};
0 commit comments