aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/abituguru.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-09-28 19:23:27 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-28 19:23:27 -0400
commit2ff712585a5026a021859233fce145068292584d (patch)
tree1dda6f9fa831be1267cafe260932f0abfccc4583 /drivers/hwmon/abituguru.c
parent6174d0fd35f486f59b743630bdf088a9f9792d4d (diff)
parent3379ceeefde923a05c2c77ed2d84ba26c2fe9e81 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/hwmon-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/hwmon-2.6: (39 commits) hwmon: Remove Yuan Mu's address hwmon: Fix unchecked return status, SMSC chips hwmon: Fix unchecked return status, batch 6 w83792d: Fix unchecked return status w83l785ts: Fix unchecked return status w83781d: Fix unchecked return status vt8231: Fix unchecked return status Fix unchecked return status, batch 5 hwmon: Fix unchecked return status, batch 4 hwmon: Fix unchecked return status, batch 3 hwmon: Fix unchecked return status, batch 2 w83627ehf: Fix unchecked return status pc87360: Check for error on sysfs files creation pc87360: Delete sysfs files on device deletion pc87360: Move some code around hwmon: Fix unchecked return status, batch 1 vt1211: Document module parameters vt1211: Add documentation hwmon: New driver for the VIA VT1211 w83791d: Documentation update ...
Diffstat (limited to 'drivers/hwmon/abituguru.c')
-rw-r--r--drivers/hwmon/abituguru.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/drivers/hwmon/abituguru.c b/drivers/hwmon/abituguru.c
index 35ad1b032726..e5cb0fdab9b1 100644
--- a/drivers/hwmon/abituguru.c
+++ b/drivers/hwmon/abituguru.c
@@ -1354,13 +1354,39 @@ LEAVE_UPDATE:
1354 return NULL; 1354 return NULL;
1355} 1355}
1356 1356
1357#ifdef CONFIG_PM
1358static int abituguru_suspend(struct platform_device *pdev, pm_message_t state)
1359{
1360 struct abituguru_data *data = platform_get_drvdata(pdev);
1361 /* make sure all communications with the uguru are done and no new
1362 ones are started */
1363 mutex_lock(&data->update_lock);
1364 return 0;
1365}
1366
1367static int abituguru_resume(struct platform_device *pdev)
1368{
1369 struct abituguru_data *data = platform_get_drvdata(pdev);
1370 /* See if the uGuru is still ready */
1371 if (inb_p(data->addr + ABIT_UGURU_DATA) != ABIT_UGURU_STATUS_INPUT)
1372 data->uguru_ready = 0;
1373 mutex_unlock(&data->update_lock);
1374 return 0;
1375}
1376#else
1377#define abituguru_suspend NULL
1378#define abituguru_resume NULL
1379#endif /* CONFIG_PM */
1380
1357static struct platform_driver abituguru_driver = { 1381static struct platform_driver abituguru_driver = {
1358 .driver = { 1382 .driver = {
1359 .owner = THIS_MODULE, 1383 .owner = THIS_MODULE,
1360 .name = ABIT_UGURU_NAME, 1384 .name = ABIT_UGURU_NAME,
1361 }, 1385 },
1362 .probe = abituguru_probe, 1386 .probe = abituguru_probe,
1363 .remove = __devexit_p(abituguru_remove), 1387 .remove = __devexit_p(abituguru_remove),
1388 .suspend = abituguru_suspend,
1389 .resume = abituguru_resume,
1364}; 1390};
1365 1391
1366static int __init abituguru_detect(void) 1392static int __init abituguru_detect(void)