diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-28 16:23:27 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-28 16:23:27 -0700 |
commit | 2ff712585a5026a021859233fce145068292584d (patch) | |
tree | 1dda6f9fa831be1267cafe260932f0abfccc4583 /drivers/hwmon/abituguru.c | |
parent | 6174d0fd35f486f59b743630bdf088a9f9792d4d (diff) | |
parent | 3379ceeefde923a05c2c77ed2d84ba26c2fe9e81 (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.c | 30 |
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: return NULL; } +#ifdef CONFIG_PM +static int abituguru_suspend(struct platform_device *pdev, pm_message_t state) +{ + struct abituguru_data *data = platform_get_drvdata(pdev); + /* make sure all communications with the uguru are done and no new + ones are started */ + mutex_lock(&data->update_lock); + return 0; +} + +static int abituguru_resume(struct platform_device *pdev) +{ + struct abituguru_data *data = platform_get_drvdata(pdev); + /* See if the uGuru is still ready */ + if (inb_p(data->addr + ABIT_UGURU_DATA) != ABIT_UGURU_STATUS_INPUT) + data->uguru_ready = 0; + mutex_unlock(&data->update_lock); + return 0; +} +#else +#define abituguru_suspend NULL +#define abituguru_resume NULL +#endif /* CONFIG_PM */ + static struct platform_driver abituguru_driver = { .driver = { .owner = THIS_MODULE, .name = ABIT_UGURU_NAME, }, - .probe = abituguru_probe, - .remove = __devexit_p(abituguru_remove), + .probe = abituguru_probe, + .remove = __devexit_p(abituguru_remove), + .suspend = abituguru_suspend, + .resume = abituguru_resume, }; static int __init abituguru_detect(void) |