diff options
Diffstat (limited to 'drivers/hwmon/abituguru3.c')
-rw-r--r-- | drivers/hwmon/abituguru3.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/hwmon/abituguru3.c b/drivers/hwmon/abituguru3.c index a5bc4287daa6..5d582aebff87 100644 --- a/drivers/hwmon/abituguru3.c +++ b/drivers/hwmon/abituguru3.c | |||
@@ -1141,10 +1141,10 @@ LEAVE_UPDATE: | |||
1141 | return NULL; | 1141 | return NULL; |
1142 | } | 1142 | } |
1143 | 1143 | ||
1144 | #ifdef CONFIG_PM | 1144 | #ifdef CONFIG_PM_SLEEP |
1145 | static int abituguru3_suspend(struct platform_device *pdev, pm_message_t state) | 1145 | static int abituguru3_suspend(struct device *dev) |
1146 | { | 1146 | { |
1147 | struct abituguru3_data *data = platform_get_drvdata(pdev); | 1147 | struct abituguru3_data *data = dev_get_drvdata(dev); |
1148 | /* | 1148 | /* |
1149 | * make sure all communications with the uguru3 are done and no new | 1149 | * make sure all communications with the uguru3 are done and no new |
1150 | * ones are started | 1150 | * ones are started |
@@ -1153,26 +1153,27 @@ static int abituguru3_suspend(struct platform_device *pdev, pm_message_t state) | |||
1153 | return 0; | 1153 | return 0; |
1154 | } | 1154 | } |
1155 | 1155 | ||
1156 | static int abituguru3_resume(struct platform_device *pdev) | 1156 | static int abituguru3_resume(struct device *dev) |
1157 | { | 1157 | { |
1158 | struct abituguru3_data *data = platform_get_drvdata(pdev); | 1158 | struct abituguru3_data *data = dev_get_drvdata(dev); |
1159 | mutex_unlock(&data->update_lock); | 1159 | mutex_unlock(&data->update_lock); |
1160 | return 0; | 1160 | return 0; |
1161 | } | 1161 | } |
1162 | |||
1163 | static SIMPLE_DEV_PM_OPS(abituguru3_pm, abituguru3_suspend, abituguru3_resume); | ||
1164 | #define ABIT_UGURU3_PM &abituguru3_pm | ||
1162 | #else | 1165 | #else |
1163 | #define abituguru3_suspend NULL | 1166 | #define ABIT_UGURU3_PM NULL |
1164 | #define abituguru3_resume NULL | ||
1165 | #endif /* CONFIG_PM */ | 1167 | #endif /* CONFIG_PM */ |
1166 | 1168 | ||
1167 | static struct platform_driver abituguru3_driver = { | 1169 | static struct platform_driver abituguru3_driver = { |
1168 | .driver = { | 1170 | .driver = { |
1169 | .owner = THIS_MODULE, | 1171 | .owner = THIS_MODULE, |
1170 | .name = ABIT_UGURU3_NAME, | 1172 | .name = ABIT_UGURU3_NAME, |
1173 | .pm = ABIT_UGURU3_PM | ||
1171 | }, | 1174 | }, |
1172 | .probe = abituguru3_probe, | 1175 | .probe = abituguru3_probe, |
1173 | .remove = __devexit_p(abituguru3_remove), | 1176 | .remove = __devexit_p(abituguru3_remove), |
1174 | .suspend = abituguru3_suspend, | ||
1175 | .resume = abituguru3_resume | ||
1176 | }; | 1177 | }; |
1177 | 1178 | ||
1178 | static int __init abituguru3_dmi_detect(void) | 1179 | static int __init abituguru3_dmi_detect(void) |